summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/play.js b/play.js
index b675d31..6929382 100644
--- a/play.js
+++ b/play.js
@@ -181,7 +181,7 @@ function on_blur_town(evt) {
function on_click_town(evt) {
let where = evt.target.town
- send_action('town', where)
+ send_action('town', where) || send_action('townb', where)
}
const STEP_TEXT = [ 0, "I", "II", "III", "IIII" ]
@@ -652,11 +652,20 @@ function update_map() {
if (ui.towns[t]) {
ui.towns[t].classList.remove('highlight')
ui.towns[t].classList.remove('muster')
+ ui.towns[t].classList.remove('bad')
}
}
- if (view.actions && view.actions.town)
- for (let t of view.actions.town)
+ if (view.actions && view.actions.town) {
+ for (let t of view.actions.town) {
ui.towns[t].classList.add('highlight')
+ }
+ }
+ if (view.actions && view.actions.townb) {
+ for (let t of view.actions.townb) {
+ ui.towns[t].classList.add('highlight')
+ ui.towns[t].classList.add('bad')
+ }
+ }
if (view.muster)
ui.towns[view.muster].classList.add('muster')