Improved isMoveValid to where it is now usable.