Fixed getPossibleMoves to remove any nulls within the returned array.