Пример #1
0
        }        //end DetermineNumberOfPlayers

        /// <summary>
        /// The players' tokens are placed on the Start square
        /// </summary>
        private void PrepareToPlay()
        {
            DetermineNumberOfPlayers();
            UpdatePlayersGuiLocations(TypeOfGuiUpdate.RemovePlayer);
            SpaceRaceGame.SetUp();
            InitGUIControls();
            UpdatePlayersGuiLocations(TypeOfGuiUpdate.AddPlayer);
        }        //end PrepareToPlay()
Пример #2
0
        public SpaceRaceForm()
        {
            InitializeComponent();

            Board.SetUpBoard();
            ResizeGUIGameBoard();
            SetUpGUIGameBoard();
            SetupPlayersDataGridView();
            DetermineNumberOfPlayers();
            SpaceRaceGame.SetUp();
            PrepareToPlay();
        }
Пример #3
0
        /// <summary>
        /// Space Race Game
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            bool replay;

            DisplayIntroductionMessage();
            do
            {
                // Initialise
                Board.SetUpBoard();
                SpaceRaceGame.NumberOfPlayers = GetNumPlayers();
                SpaceRaceGame.SetUp();
                // Place race
                Race();
                // Prompt replay
                GetReplay(out replay);
            } while (replay);
            PressEnter();
        }        //end Main