Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module.exports = class {
constructor(controller, utils) {
this.controller = controller;
this.side = controller.side;
this.utils = utils;
}
turn() {
let p = this.controller.pieces()[0];
let m = this.controller.check_space(p.x, p.y).moves[0] || false;
if (p && m) {
this.controller.select_space(p.x, p.y);
this.controller.move(m.x, m.y);
} else {
this.controller.declare(true);
}
}
end_turn() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment