package battleship.model; import battleship.utils.Pair; public enum Direction { RIGHT(new Pair<>(0, 1), "D"), LEFT(new Pair<>(0,-1), "G"), UP(new Pair<>(-1,0), "H"), DOWN(new Pair<>(1,0), "B"), DEFAULT(new Pair<>(-1,-1), null); private final Pair direction; private final String keyword; Direction(Pair ukPair, String keyword) { this.direction = ukPair; this.keyword = keyword; } public Pair getDirection() { return direction; } public String getKeyword() { return keyword; } }