Esempio n. 1
0
        /// <summary>
        /// Executes the command in the given game context
        /// </summary>
        public override void Execute(Pirates.IPirateGame game)
        {
            // stop pirates from sailing to their own location
            if (this.Pirate.Location.Equals(this.ImmediateDestination))
            {
                return;
            }

            game.SetSail(this.Pirate.NativeObject, this.ImmediateDestination.NativeObject);
        }
Esempio n. 2
0
 /// <summary>
 /// Executes the command in the given game context
 /// </summary>
 public override void Execute(Pirates.IPirateGame game)
 {
     game.Defend(this.Pirate.NativeObject);
 }
Esempio n. 3
0
 /// <summary>
 /// Executes the command in the given game context
 /// </summary>
 public override void Execute(Pirates.IPirateGame game)
 {
     game.Attack(this.AttackingPirate.NativeObject, this.AttackedPirate.NativeObject);
 }
Esempio n. 4
0
 /// <summary>
 /// Executes the command in the given game context
 /// </summary>
 public override void Execute(Pirates.IPirateGame game)
 {
     // do nothing command does nothing, ya know
 }
Esempio n. 5
0
 /// <summary>
 /// Executes the command in the given game context
 /// </summary>
 public abstract void Execute(Pirates.IPirateGame game);