예제 #1
0
        public Boolean FireMissile(string row, string column)
        {
            string opponentSpot = opponentBoard.GetValueAtPosition(row, column);

            if (opponentSpot == StringContants.BoatLocation)
            {
                personalBoard.PlaceMissile(row, column, StringContants.BoatImage);
                opponentBoard.PlaceMissile(row, column, StringContants.HitBoat);
                missileHits += 1;
                return(true);
            }
            else
            {
                personalBoard.PlaceMissile(row, column, StringContants.MissileMissImage);
                return(false);
            }
        }