示例#1
0
 public Game1(FNAApp fnaApp)
 {
     _fnaApp = fnaApp;
     //call function when receive startSelectPieceEvent
     fnaApp.startSelectPieceEvent += () => { _needToPromptUserForPiece = true; };
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
 }
示例#2
0
        public static void Main(string[] args)
        {
            IFrontend frontend = new FNAApp();

            _currentPlayer = Teams.White;
            //Set Up Board
            Board.SetUpBoard();


            //Update Loop
            var turn = 0;

            Player[] PlayerList = { new Player(Teams.White), new Player(Teams.Black) };
            while (!gameOver())
            {
                frontend.PrintBoard();
                var currentPlayer = PlayerList[turn % PlayerList.Length];
                GetInput(currentPlayer, frontend);
                turn++;
            }
        }