/* * Part of the game where the difficulty is set, both players are initialised and the ships can be set on the board * @author Stanislav Yurchenko * @version 05/12/2017 */ public void Debut() { SetDifficulty(); user = new UserPlayer(PlayerName, enemy); enemy.SetOpponent(user); // this.VisualiseShips(); }
public GameState(int enemySeconds, int playerSeconds, bool?Difficulty, String PlayerName, UserPlayer user, Player enemy, String[] drawElements, bool gameInProgress) { this.enemySeconds = enemySeconds; this.playerSeconds = playerSeconds; this.Difficulty = Difficulty; this.PlayerName = PlayerName; this.user = user; this.enemy = enemy; this.drawElements = drawElements; this.gameInProgress = gameInProgress; }
public UsrCtrlPlayGround(GameState gameState) { InitializeComponent(); if (gameState != null) { this.gameState = gameState; this.enemySeconds = this.gameState.getEnemySeconds(); this.playerSeconds = this.gameState.getPlayerSeconds(); this.Difficulty = this.gameState.getDifficulty(); this.PlayerName = this.gameState.getPlayerName(); this.user = this.gameState.getUser(); this.enemy = this.gameState.getEnemy(); this.drawnElements = this.gameState.getDrawElements(); this.gameInProgress = this.gameState.getGameInProgress(); if (this.gameInProgress) { Mittelspiel(); } } }
public void setUser(UserPlayer user) { this.user = user; }