hello all;
im kinda new to this kinda stuff was just wondering if someone could please help me out with the following parts i have there
... my compiler isnt really letting me draw the board it keeps on insisiting that i have invalid types of data.. also i cant use too many advanced features it has to be really simplisitc ... no vectors or just a simple array.
below is roughly what is ment to happen ... if anybody can show me a pathway or how to accomplsh this it would be really helpfull thankyou.
1. The function void initialiseBoard(char[ROW][COL]) initialises the 2D
array, which will store the configuration of the board during the game, that is, this
array will be updated according to each player’s move.
2. The function void drawBoard(char[ROW][COL]) draws the current
configuration of the board at the beginning of the game and after each player’s move.
For example, after two moves from Player 1 and one move from Player 2 the board’s
configuration could be:
........
........
........
........
O.......
X...O...
12345678
Where 'O' is a constant char that represents the move of Player 1 and 'X' is a
constant char that represents the move of Player 2.
3. The function int playerMove(char[ROW][COL], char, int) must
check if the user’s input is valid – i.e. an integer between 0 and 8, and if there is room
in the column chosen for one more piece– update the 2D array, which stores the
game’s configuration according to the users input, and return the user’s input to the
calling function. The function’s arguments of type char and int are used to pass to
the function the character ‘O’ and the integer 1 for player’s 1 move, and ‘X’ and 2 for
player 2.