Set<CMove> moves = new HashSet<>();
ESide side = position.get(square).getSide();
ESquare s;
s = square;
while (s.nw() != null) {
s = s.nw();
if (position.get(s) == null) {
moves.add(new CMove(square, s));
} else if (position.get(s).getSide() != side) {
moves.add(new CMove(square, s));