function Mind() { this.newRun = function() { }; this.getAction = function ( state ) { let game = new Chess(state); let move = game.moves()[0]; return move; }; this.endRun = function() { }; }