Code viewer for Mind: Random
 
function Mind() 
{ 
        
        this.newRun = function()                  
        {
        };


        this.getAction = function ( state )              
        { 
            let game = new Chess(state);
            let moves = game.moves();
            let move = moves[Math.floor(Math.random() * moves.length)];
            return ( move );                            
        };

                 
        this.endRun = function()                 
        {
        };

}