adding mocha tests and game logic for finding next moves