コード例 #1
0
ファイル: Game.cs プロジェクト: garret1evg/OOP-Sea-battle
        public Unit Battle()
        {
            StrategyEndGame end  = new StrategyEndGame(unit1, unit2);
            ShootingTurn    turn = new ShootingTurn(unit1, unit2);

            do
            {
                turn.Do();
                textBox.Text = unit1.myMap.DrawToStr() + "\n\n\n" + unit2.myMap.DrawToStr();
                //Thread.Sleep(1000);
            } while (!end.CheckForEnd());
            return(unit1);
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: garret1evg/OOP-Sea-battle
        public Unit Battle()
        {
            StrategyEndGame end  = new StrategyEndGame(unit1, unit2);
            ShootingTurn    turn = new ShootingTurn(unit1, unit2);

            do
            {
                turn.Do();
                //Console.Write(unit1.myMap.DrawToStr() + "\n\n\n" + unit2.myMap.DrawToStr());
                //Thread.Sleep(1000);
            } while (!end.CheckForEnd());
            end.SetStrategy();
            unit1.EndGame();
            unit2.EndGame();
            return(unit1);
        }