예제 #1
0
    public void StartGame()
    {
        int turnIndex = 0;

        while (turnIndex % this.Players.Length != 0 || !CheckEndGameState(this.Players))
        {
            bool   validPlay = false;
            string message   = "";

            int playerIndex = turnIndex % this.Players.Length;

            ProgramOutput.PrintBoardState(Board);

            Player player = Players[playerIndex];

            ProgramOutput.PrintPlayerState(player);

            (validPlay, message) = UserInput.GetCommands(Board, player);

            ProgramOutput.CommandFeedback(message);

            if (validPlay == true)
            {
                ProgramOutput.ValidInputMessage(message);
                turnIndex++;
            }
            else
            {
                ProgramOutput.InvalidInputWarning(message);
            }
        }

        ProgramOutput.EndGameScoring(Players);
        ProgramOutput.PreExitPrompt();
    }
예제 #2
0
 public void ValidInputMessage_Passing()
 {
     ProgramOutput.ValidInputMessage("");
 }