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); }
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); }