// <summary> // Completes the deployment phase of the game and // switches to the battle mode (Discovering state) // </summary> // <remarks> // This adds the players to the game before switching // state. // </remarks> public static void EndDeployment() { // deploy the players and ai _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); GameController.SwitchState(GameState.Discovering); }
/// <summary> /// Completes the deployment phase of the game and /// switches to the battle mode (Discovering state) /// </summary> /// <remarks> /// This adds the players to the game before switching /// state. /// </remarks> public static void EndDeployment() { // deploy the players _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); SwitchState(GameState.Discovering); }
/// <summary> /// Completes the deployment phase of the game and /// switches to the battle mode (Discovering state) /// </summary> /// <remarks> /// This adds the players to the game before switching /// state. /// </remarks> public static void EndDeployment() { //deploy the players _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); SwitchState(GameState.Discovering); Audio.PlaySoundEffect(GameResources.GameSound("Siren")); }
// <summary> // Completes the deployment phase of the game and // switches to the battle mode (Discovering state) // </summary> // <remarks> // This adds the players to the game before switching // state. // </remarks> public static void EndDeployment() { //deploy the players _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); SwitchState(GameState.Discovering); Audio.PlayMusic(GameResources.GameMusic("MenuMusic")); }
/// <summary> /// Completes the deployment phase of the game and /// switches to the battle mode (Discovering state) /// </summary> /// <remarks> /// This adds the players to the game before switching /// state. /// </remarks> public static void EndDeployment() { //deploy the players _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); SwinGame.PlayMusic(GameResources.GameMusic("Background2")); //Changes the music played during the Battle Phase - Eddie SwitchState(GameState.Discovering); }
/// <summary> /// Completes the deployment phase of the game and /// switches to the battle mode (Discovering state) /// </summary> /// <remarks> /// This adds the players to the game before switching /// state. /// </remarks> public static void EndDeployment() { //deploy the players _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); countdown = SwinGame.CreateTimer(); SwinGame.StartTimer(countdown); SwitchState(GameState.Discovering); }
public void adddeployedPlayer() { BattleShipsGame game = new BattleShipsGame(); Player ply1 = new Player(game); Player ply2 = new Player(game); game.AddDeployedPlayer(ply1); game.AddDeployedPlayer(ply2); Player expected = ply1; Player actual = game.Player; Assert.AreEqual(expected, actual); }
public void TestHere() { _loadedGame.AddDeployedPlayer(_humanPlayer); _loadedGame.Player.EnemyGrid.HitTile(1, 3); _loadedGame.Shoot(1, 2); //GameController.SetDifficulty(AIOption.Hard); //Assert.AreEqual(_game.getOption, GameController.Difficulty); //TestContext.WriteLine(_game.getOption); //TestContext.WriteLine(GameController.Difficulty); // _game.getOption == GameController.ComputerPlayer. }
public static void EndDeployment(bool isReset = false, bool isFirst = false) { if (isReset) { _human = ObjectCopier.Clone(_backup_player); _ai = ObjectCopier.Clone(_backup_aiplayer); _theGame.ResetDeployedPlayer(); //_human.Enemy = _backup_player.Enemy; //_human.EnemyGrid = _backup_player.EnemyGrid; //_human.Game = _backup_player.Game; //_human.Hits = _backup_player.Hits; //_human.Missed = _backup_player.Missed; //_human.PlayerGrid = _backup_player.PlayerGrid; //_human.Shots = _backup_player.Shots; //_ai.Enemy = _backup_aiplayer.Enemy; //_ai.EnemyGrid = _backup_aiplayer.EnemyGrid; //_ai.Game = _backup_aiplayer.Game; //_ai.Hits = _backup_aiplayer.Hits; //_ai.Missed = _backup_aiplayer.Missed; //_ai.PlayerGrid = _backup_aiplayer.PlayerGrid; //_ai.Shots = _backup_aiplayer.Shots; _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); } else { //deploy the players _theGame.AddDeployedPlayer(_human); _theGame.AddDeployedPlayer(_ai); if (isFirst) { _backup_player = ObjectCopier.Clone(_human); _backup_aiplayer = ObjectCopier.Clone(_ai); } } SwitchState(GameState.Discovering); }