private void AddHitOnComputerBoard(int buttonToNumber) { UpdateNumberOfMovesOnGameboard(); ComputerButtonsInGame[buttonToNumber].HitOrMiss = "Träff"; ChangeGridSquareToExplosionImage(ComputerButtonsInGame[buttonToNumber]); PlayerShotsFired.Add(buttonToNumber); }
private void AddCloseOrMissOnComputerBoard(int buttonToNumber) { UpdateNumberOfMovesOnGameboard(); PlayerShotsFired.Add(buttonToNumber); if (MyGameEngine.PlayerCheckCloseOrNot(ComputerButtonsInGame[buttonToNumber].Longitude, ComputerButtonsInGame[buttonToNumber].Latitude) == true) { ComputerButtonsInGame[buttonToNumber].HitOrMiss = "Nära"; ChangeGridSquareToSplashSonarImage(ComputerButtonsInGame[buttonToNumber]); } else { ComputerButtonsInGame[buttonToNumber].HitOrMiss = "Miss"; ChangeToSplashImage(ComputerButtonsInGame[buttonToNumber]); } }