Skip to content

Instantly share code, notes, and snippets.

Created April 5, 2012 01:44
Show Gist options
  • Save anonymous/2307327 to your computer and use it in GitHub Desktop.
Save anonymous/2307327 to your computer and use it in GitHub Desktop.
Gomoku logic
#include <iostream>
using namespace std;
void logic();
int main()
{
logic();
}
void logic()
{
cout << "What dimensions would you like for your board?\n" << "Width?" << endl;
int width;
int height;
cin >> width;
cout << "Height?" << endl;
cin >> height;
int array[width][height];
for ( int y = 0; y <= height; y++)
{
for( int x = 0; x <= width; x++)
{
array[x + 1][y] = 1 + x;
array[width - x][y] = 1 + x;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment