public void HitWater(Player player, Player computer, Position iShootPosition, Battlefield battlefield, IPositionParser positionParser) { // Display Graphic GraphicManager.DisplayBattleView(player, computer, battlefield); //Sound Effects SoundEffects.HitWaterSoundPlayer(); //information Console.ForegroundColor = ConsoleColor.DarkCyan; Console.WriteLine(" \" Shoot [ {0} ]\" ", positionParser.BackParser(iShootPosition)); Console.WriteLine(); Console.Write(" LOST "); //Thread.Sleep(500); //Console.Write("..."); //Thread.Sleep(1000); Console.ReadKey(); }
public static Position ComputerShoot(Player player, Player computer, Battlefield battlefield, IRandomManager randomManager, IPositionParser positionParser) { Console.Clear(); GraphicManager.DisplayBattleView(player, computer, battlefield); // [!!!] should be better Position pcShootPosition = randomManager.RandomPosition(battlefield.ColumnSize, battlefield.RowSize); Console.WriteLine(" \" PC Shoot \" "); Console.WriteLine(); Console.Write(" THINKING"); // imitate Thinking Thread.Sleep(1000); Console.Write("... "); Thread.Sleep(500); Console.Write("[ {0} ]", positionParser.BackParser(pcShootPosition)); Thread.Sleep(500); Console.Write(" ..."); Thread.Sleep(500); return(pcShootPosition); }