Created
April 5, 2012 01:44
-
-
Save anonymous/2307327 to your computer and use it in GitHub Desktop.
Gomoku logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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