for (let key_selector of key_selectors) {
this.keys[key_selector.id.slice(4)] = key_selector.value;
}
- this.movement_keys = {
- [this.keys.square_move_up]: 'UP',
- [this.keys.square_move_left]: 'LEFT',
- [this.keys.square_move_down]: 'DOWN',
- [this.keys.square_move_right]: 'RIGHT'
- };
- if (game.map_geometry == 'Hex') {
+ if (game.map_geometry == 'Square') {
+ this.movement_keys = {
+ [this.keys.square_move_up]: 'UP',
+ [this.keys.square_move_left]: 'LEFT',
+ [this.keys.square_move_down]: 'DOWN',
+ [this.keys.square_move_right]: 'RIGHT'
+ };
+ document.getElementById("move_upright").hidden = true;
+ document.getElementById("move_upleft").hidden = true;
+ document.getElementById("move_downright").hidden = true;
+ document.getElementById("move_downleft").hidden = true;
+ document.getElementById("move_up").hidden = false;
+ document.getElementById("move_down").hidden = false;
+ } else if (game.map_geometry == 'Hex') {
+ document.getElementById("move_upright").hidden = false;
+ document.getElementById("move_upleft").hidden = false;
+ document.getElementById("move_downright").hidden = false;
+ document.getElementById("move_downleft").hidden = false;
+ document.getElementById("move_up").hidden = true;
+ document.getElementById("move_down").hidden = true;
this.movement_keys = {
[this.keys.hex_move_upleft]: 'UPLEFT',
[this.keys.hex_move_upright]: 'UPRIGHT',