public void Brawl(Pirate otherPirate) { if (otherPirate.IsDead || IsDead) //check for pirates condition { Console.WriteLine("He's dead."); return; } else if (otherPirate.IsPassedOut || IsPassedOut) { Console.WriteLine("He's done for today"); return; } //generate the random number from array and save it to chance Random random = new Random(); int chance = random.Next(1, 4); switch (chance) //three cases for the otcome of Brawl { case 1: otherPirate.Die(); break; case 2: Die(); break; case 3: otherPirate.PassOut(); PassOut(); break; } }
public string GetShipStatus() { return("Our captain's passed out: " + captain.PassOut() + " or is he still alive: " + captain.Die() + " and he drunk how much: " + captain.DrinkSomeRum()); }