package battleship.model; import battleship.utils.Pair; public enum Direction { RIGHT(new Pair<>(1, 0), "D"), LEFT(new Pair<>(-1,0), "G"), UP(new Pair<>(0,-1), "H"), DOWN(new Pair<>(0,1), "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; } }