2017-04-21 22:50:48 +02:00
|
|
|
package de.dj_steam.bot.domain;
|
|
|
|
|
|
|
|
import lombok.Getter;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author steam
|
|
|
|
*/
|
|
|
|
@Getter
|
|
|
|
public class ToyBotField {
|
2017-04-22 17:26:00 +02:00
|
|
|
private int width = 4;
|
|
|
|
private int height = 4;
|
2017-04-22 21:46:05 +02:00
|
|
|
|
|
|
|
public boolean isInsideTheField(final Position position) {
|
|
|
|
return (position.getX() >= 0 &&
|
|
|
|
position.getY() >= 0 &&
|
|
|
|
position.getX() <= width &&
|
|
|
|
position.getY() <= height);
|
|
|
|
}
|
|
|
|
|
2017-04-21 22:50:48 +02:00
|
|
|
}
|