<script src="https://urobot2011.github.io/SaveMartin/MartyBot/chess/chess.js"></script>
<script src="https://urobot2011.github.io/ECO.js/src/ECO.js"></script>
<script>
var ECO = new ECOjs(new Chess());
//here is your code
var openings = ECO.engineOnly.currentlyAvailableOpening(game);
game.move(openings[Math.floor(Math.random() * openings.length)].move);
</script>
urobot2011 / eco.js Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License