Implemented legalMove +bugfix