Exemple #1
0
        public IAction Do(Control.IController engine)
        {
            IAction action = engine.Table.LuckyCards[0].Action;

            engine.Table.LuckyCards.RemoveAt(0);
            return(action);
        }
 public bool Cond(Control.IController engine)
 {
     if (cond != null)
     {
         return(cond.Invoke(engine));
     }
     return(true);
 }
        public IAction Do(Control.IController engine)
        {
            if (Cond(engine))
            {
                engine.CurrentPlayer.Money -= amount;
            }

            return(new Nothing());
        }
        public IAction Do(Control.IController engine)
        {
            if (Cond(engine))
            {
                engine.CurrentPlayer.BookToken += price;
            }

            return(new Nothing());
        }
Exemple #5
0
 public IAction Do(Control.IController engine)
 {
     if (Cond(engine))
     {
         House house = new House(price, loan);
         engine.CurrentPlayer.Home = house;
         return(new Nothing());
     }
     else
     {
         return(new Nothing());
     }
 }
Exemple #6
0
        public IAction Do(Control.IController engine)
        {
            if (untilRoll == null)
            {
                engine.CurrentPlayer.RollsLeft -= rounds;
            }
            else
            {
                engine.CurrentPlayer.BanUntilRoll = untilRoll;
            }

            return(new Nothing());
        }
Exemple #7
0
 public IAction Do(Control.IController engine)
 {
     return(engine.Step(fields));
 }
Exemple #8
0
        public IAction Do(Control.IController engine)
        {
            int step = field - engine.CurrentPlayer.CurrentField < 0 ? (engine.Table.Fields.Length - engine.CurrentPlayer.CurrentField + field) : (field - engine.CurrentPlayer.CurrentField);

            return(engine.Step(step));
        }
 public IAction Do(Control.IController engine)
 {
     throw new NothingToDoException();
 }
 public bool Cond(Control.IController engine)
 {
     return(true);
 }
 public IAction Do(Control.IController engine)
 {
     return(new Nothing());
 }
Exemple #12
0
 public IAction Do(Control.IController engine)
 {
     return(new Fee((int)((double)engine.CurrentPlayer.SavingsBook * (double)percent / 100.0)).Do(engine));
 }
 public void Do(Control.IController engine)
 {
 }
 public bool Cond(Control.IController engine)
 {
     throw new NotImplementedException();
 }
 public IAction Do(Control.IController engine)
 {
     return(fee.Do(engine));
 }
 public bool Cond(Control.IController engine)
 {
     return(fee.Cond(engine));
 }
Exemple #17
0
 public bool Cond(Control.IController engine)
 {
     return(engine.CurrentPlayer.Money >= price);
 }
 public void Do(Control.IController engine)
 {
     throw new NotImplementedException();
 }
Exemple #19
0
 public IAction Do(Control.IController engine)
 {
     engine.CurrentPlayer.RollsLeft += rolls;
     return(new Nothing());
 }