update of the 'getPossibleMoves' function.
only passes one test, need to fix the two other ones.