internal void PlaceBeeper(Beeper beeper) { if (!_beepers.Contains(beeper)) { _beepers.Add(beeper); } }
/// <Summary> /// Take a beeper from the robot's bag and place it in the world at the robot's current location. /// If there is no beeper in the robot's bag, the robot will be destroyed. /// </Summary> public void PutBeeper() { ConfirmOnThen(() => { if (beeperCount < 1) { throw new RobotDestructionException("Bag is empty"); } var beeper = new Beeper(Street, Avenue); _world.PlaceBeeper(beeper); }); }