public bool IsEmpty(int x, int y) { if (game.IsOutOfBorder(x, y)) { return(false); } return((game.Map[x, y] == null) || (game.Map[x, y] is Digger) && (y - StartY > 1)); }
public CreatureCommand Act(int x, int y) { if (game.IsOutOfBorder(x + DirectionX, y + DirectionY) || IsSack(x + DirectionX, y + DirectionY, game)) { return(new CreatureCommand(0, 0, this)); } return(new CreatureCommand(DirectionX, DirectionY, this)); }