summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js6
-rw-r--r--rules.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/play.js b/play.js
index 26b2407..608d2d9 100644
--- a/play.js
+++ b/play.js
@@ -488,7 +488,7 @@ function update_map() {
for (let area = 1; area < AREAS.length; ++area)
layout[area] = { north: [], south: [] }
- for (let b in view.location) {
+ for (let b = 0; b < BLOCKS.length; ++b) {
if (view.location[b] === 0 && BLOCKS[b].mortal) {
let element = ui.blocks[b]
if (BLOCKS[b].owner === "Scotland")
@@ -498,12 +498,12 @@ function update_map() {
}
}
- for (let b in view.location) {
+ for (let b = 0; b < BLOCKS.length; ++b) {
let info = BLOCKS[b]
let element = ui.blocks[b]
let area = view.location[b]
if (area > 0 || BLOCKS[b].mortal) {
- let moved = set_has(view.moved, b) ? " moved" : ""
+ let moved = (set_has(view.moved, b) && view.who !== b) ? " moved" : ""
if (is_known_block(b) || area === 0) {
let image = " block_" + info.image
let steps = " r" + (info.steps - view.steps[b])
diff --git a/rules.js b/rules.js
index 58f3a5b..3832b57 100644
--- a/rules.js
+++ b/rules.js
@@ -1576,6 +1576,7 @@ states.move_where = {
game.who = NOBODY
game.state = 'move_who'
} else {
+ set_add(game.moved, game.who)
if (game.distance === 0)
game.move_buf = [ area_tag(from) ]
let mark = move_block(game.who, from, to)
@@ -1602,7 +1603,6 @@ function end_move() {
game.activated.push(game.origin)
game.moves --
}
- set_add(game.moved, game.who)
game.turn_log.push(game.move_buf)
}
delete game.move_buf