public void NewRound() { this.currentPlayer = this.startingGenericPlayer; //initialising map this.drawBattleGround = new Map(); ///making an array to store the positions of players int[] positionPlayers = new int[arrNumPlayer.Length]; positionPlayers = CalculatePlayerPositions(arrNumPlayer.Length); //random positioning for players Randomise(positionPlayers); //player to keep start looping through the player int player = 0; do { //if null means its all matching and no need to create anymore players //so we break it if (modelPlayerController[player] == null) { break; } //if not null then keep making each player else { //for each player to start the round modelPlayerController[player].StartRound(); //taking the horizontal position from positionPlayer array at the current index int tHorizontalPosition = positionPlayers[player]; //getting positioning for tank from map class int tVerticalPosition = drawBattleGround.TankVerticalPosition(tHorizontalPosition); //create the tank itself with values that we gathered from above BattleTank tank = new BattleTank(modelPlayerController[player], tHorizontalPosition, tVerticalPosition, this); //each instance that we are looping through creates a tank modelPlayerTank[player] = tank; player++; } } while (player < this.arrNumPlayer.Length); //random number, wind speed, initialising form Random rnd = new Random(); this.windSpeed = rnd.Next(-100, 100); GameForm newForm = new GameForm(this); newForm.Show(); }
public abstract void CommenceTurn(GameForm gameplayForm, GameController currentGame);
public override void CommenceTurn(GameForm gameplayForm, GameController currentGame) { throw new NotImplementedException(); }
public override void StartTurn(GameForm gameplayForm, Game currentGame) { gameplayForm.EnableControlPanel(); }
public override void BeginTurn(GameForm gameplayForm, Game currentGame) { gameplayForm.EnableTankControls(); }
public abstract void StartTurn(GameForm gameplayForm, Game currentGame);
public abstract void BeginTurn(GameForm gameplayForm, Game currentGame);
public override void BeginTurn(GameForm gameplayForm, Game currentGame) { }