Added the ability to check if moves are valid. Flips are not implemented yet though.