fixed error in chess piece is valid move

also starting to code tests