Exemple #1
0
        public override void Use(IPlayer sender, IThing other)
        {
            Action action = other switch
            {
                Splinters splinters => () => BurnSplinters(sender, splinters),
                Tofu tofu => () => BurnTofu(sender, tofu),
                _ => () => { }
            };

            action();
        }
Exemple #2
0
 private void BurnTofu(IPlayer sender, Tofu tofu)
 {
     if (Burning)
     {
         if (tofu.Frozen)
         {
             sender.Reply($"The {tofu} melts a little and the dripping water extinguished the {this}.");
             Burning = false;
         }
         else
         {
             sender.Reply($"Your {tofu} is really warm now.");
             tofu.Warm = true;
         }
     }
     else
     {
         sender.Reply($"The cold {this} does absolutely nothing to your {tofu}.");
     }
     Game.BroadcastMsg($"{sender} put {tofu} into {this} in the {Game.Kitchen}", sender);
 }
Exemple #3
0
 public Fridge(FindLostyGame game) : base(game)
 {
     Tofu = new Tofu(game);
     Add(Tofu);
 }