1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
int main()//Game Loop
{
using namespace std;
//Variables
int NumberOfPlayers;
string PlayerOneName, PlayerTwoName;
int Difficulty;
char GameBoardState[3][3] = {'X', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '};
int GameBoardInit[3][3] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
int Move;
//Game Initialization
while (NumberOfPlayers == 0 || NumberOfPlayers > 2) //PseudoRecursive Menu Loop.
{
NumberOfPlayers = GameSetup();
}
PlayerOneName = PlayerNameInput(1, NumberOfPlayers); //Gather Player 1 Info
if (NumberOfPlayers == 2) PlayerTwoName = PlayerNameInput(2, 0); //Gather Player 2 Info
Difficulty = SetDifficulty();
DisplayGameBoard(GameBoardState);
//GameBoardInit[3][3] = InitializeGameBoard(GameBoardState);//This is the one I am having problems with
Move = ComputerMoveMainLoop(GameBoardInit, Difficulty);
cout << Move;
return 0;
}
| |