private bool TakeMove(Player hero, Player enemy) { bool wasHit; do { var guessedCell = hero.TakeShot(); wasHit = enemy.CheckForHit(guessedCell); if (wasHit && enemy.Dead()) { return true; } } while (wasHit); return false; }
private bool TakeMove(Player hero, Player enemy) { bool wasHit; do { var guessedCell = hero.TakeShot(); wasHit = enemy.CheckForHit(guessedCell); if (wasHit && enemy.Dead()) { return(true); } } while (wasHit); return(false); }