Exemple #1
0
 /*
  * 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();
 }
Exemple #2
0
 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;
 }
Exemple #3
0
 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();
         }
     }
 }
Exemple #4
0
 public void setUser(UserPlayer user)
 {
     this.user = user;
 }