public void StartRound()
        {
            /// <summary>
            ///
            /// This method begins a new round of gameplay. A game consists of multiple rounds,
            /// and a round consists of multiple turns.
            ///
            /// </summary>

            Random rand = new Random();

            _playerLoc     = GetPlayerLocations(_numPlayers.Length);
            _currentPlayer = _startPlayer;
            _currentBattle = new Battlefield();
            _numTanks      = new ControlledTank[_numPlayers.Length];
            _wind          = rand.Next(-100, 100);

            foreach (TankController value in _numPlayers)
            {
                value.BeginRound();
            }
            Rearrange(_playerLoc);
            for (int i = 0; i < _numPlayers.Length; i++)
            {
                int xPos = _playerLoc[i];
                int yPos = _currentBattle.TankVerticalPosition(xPos);
                _numTanks[i] = new ControlledTank(_numPlayers[i], xPos, yPos, this);
            }
            BattleForm battle = new BattleForm(this);

            battle.Show();
            SetupForm setup = new SetupForm();

            setup.Show();
        }
Exemple #2
0
        public void Execute(ITrafficDataAccessor curDataAccessor,
                            List <TVRequestInfo> selectedRequests,
                            IHttpClientFactory curHttpClientFactory)
        {
            _trafficFile = curDataAccessor as TrafficViewerFile;
            if (_trafficFile == null)
            {
                Log("Invalid Traffic File Given");
            }

            _selectedRequests  = selectedRequests;
            _httpClientFactory = curHttpClientFactory;

            SetupForm setupForm = new SetupForm(this, TrafficViewerOptions.TrafficViewerAppDataDir, _netSettings);

            setupForm.Show();
        }
Exemple #3
0
        private void ConstructPostionButton_Click(object sender, EventArgs e)
        {
            var form = new SetupForm(PosNumReceived);

            form.Show();
        }
Exemple #4
0
        private void btnSetup_Click(object sender, EventArgs e)
        {
            SetupForm janelaSetup = new SetupForm();

            janelaSetup.Show();
        }