Starting getLegalMoves implementation