public override bool PutMoveAbleObjectOnThisField(MoveAbleObject obj, Game game) { if (obj != null && this.MoveAbleObject == null && this.Next != null) { this.MoveAbleObject = obj; this.MoveAbleObject.Pos = this.Pos; return(true); } return(false); }
public override void Action(Game _game) { LinkedList <Field> list = _game.getGameField(); _ship = list.ElementAt(8).MoveAbleObject; if (_ship != null && this.MoveAbleObject != null && ((Ship)_ship).IsAtDock()) { ((Ship)_ship).AddGoldToShip(); } }
public override bool PutMoveAbleObjectOnThisField(MoveAbleObject obj, Game game) { if (this.direction == Directions.Up && this.Pos < obj.Pos || this.direction == Directions.Down && this.Pos > obj.Pos) { this.MoveAbleObject = obj; this.MoveAbleObject.Pos = this.Pos; return(true); } return(false); }
override public bool PutMoveAbleObjectOnThisField(MoveAbleObject obj, Game game) { if (obj != null && this.MoveAbleObject == null) { this.MoveAbleObject = obj; this.MoveAbleObject.Pos = this.Pos; return(true); } else { // Cart found! // Gameover game.setGameOver(); } return(false); }
public abstract bool PutMoveAbleObjectOnThisField(MoveAbleObject obj, Game game);