Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef GAME_H_
- #define GAME_H_
- // The main logic of the Connect 4 game. The game rules are in these functions.
- // Create an empty board.
- void InitializeBoard(int board[6][7]);
- // Draws the game board
- void DrawBoard(const int board[6][7], int column);
- // Play a piece by player at column.
- // Returns false if the move is invalid.
- bool Drop(int board[6][7], int player, int column);
- // Returns 0 if no winner yet.
- // Returns -1 if draw.
- // Returns 1 if player 1 has won.
- // Returns 2 if player 2 has won.
- int Winner(const int board[6][7]);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment