creating checkmove for game engine