AIsOfCatan.GameController.GetBoard C# (CSharp) Method

GetBoard() public method

Returns the current game board held by this controller.
public GetBoard ( ) : IBoard
return IBoard
        public IBoard GetBoard()
        {
            return board;
        }

Usage Example

Example #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            //PerformGameBenchmarking();

            var controller = new GameController();
            var agents     = new IAgent[] { new StarterAgent(), new StarterAgent(), new StarterAgent(), new StarterAgent() }; // new HumanAgent()
            int intWinner  = controller.StartGame(agents, 10, 0, false, true);

            if (intWinner != -1)
            {
                var winner = agents[intWinner];
                Console.WriteLine("Winner is: " + winner.GetName() + " (" + intWinner + ")");
            }
            else
            {
                Console.WriteLine("It is a draw after 100 rounds");
            }

            Console.WriteLine(controller.GetBoard());
        }
All Usage Examples Of AIsOfCatan.GameController::GetBoard