DrkSephy / Shogi

Implementation of Dobutsu Shogi using Minimax + Alpha-Beta pruning
http://drksephy.github.io/Shogi/
2 stars 1 forks source link

Trigger programatic click functions #23

Closed DrkSephy closed 9 years ago

DrkSephy commented 9 years ago

The AI will make its moved by triggering click actions programmatically. In order to do this, we should look at jQuery's .trigger() method.

DrkSephy commented 9 years ago

Alternatively, we can trigger click events like so:

// Click the square at (2, 1)
$('.row > .square[data-x=' + 2 + '][data-y=' + 1 + ']').click();