public State(State i_PrevState) { m_LastAddedCell = new Cell(); Board copyBoard = new Board(i_PrevState.m_Board.Size); copyBoard.CopyBoard(i_PrevState.Board); m_Board = copyBoard; m_CurrPlayer = i_PrevState.CurrPlayer; }
internal Cell GetPlayerChoise(Game.WhoIsPlaying i_Player, ref bool io_FirstTry, ref bool io_IsEnterQ) { bool validCellChoose = false; Cell inputCell = new Cell(); while (!validCellChoose) { if (io_FirstTry) { string whosTurn = string.Format("Player {0} Turn: ", i_Player == Game.WhoIsPlaying.Player1 ? "1" : "2"); Output.PrintToScreen(whosTurn); } else { Output.PrintToScreen("ERROR! Your Input Is Not Valid."); } Output.PrintToScreen("Please Enter Your Next Cell Move,Enter Row and Then Column: "); string[] numbersStr = Console.ReadLine().Split(); io_IsEnterQ = IsEnterQ(numbersStr); if (io_IsEnterQ) { break; } int row = 0, col = 0; if (IsValidstring(numbersStr, ref row, ref col)) { validCellChoose = true; inputCell.Row = row; inputCell.Col = col; } io_FirstTry = false; } return(inputCell); }
internal Cell GetPlayerChoise(Game.WhoIsPlaying i_Player, ref bool io_FirstTry, ref bool io_IsEnterQ) { return m_Input.GetPlayerChoise(i_Player, ref io_FirstTry, ref io_IsEnterQ); }
public State(Board i_Board) { m_LastAddedCell = new Cell(); m_Board = i_Board; m_CurrPlayer = Game.WhoIsPlaying.Computer; }
public Player(Game.WhoIsPlaying name, char symbol) { m_Name = name; m_Symbol = symbol; m_ScoreNum = 0; }