diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -969,9 +969,22 @@ function on_update() { ui.legacy[pi].classList.toggle("legacy_40", false) } - let y = 30 + let n = 0 + for (let k = 0; k < player_count; ++k) { + let k_legacy = view.legacy[k] + if (k_legacy > 80) + k_legacy -= 40 + if (k_legacy > 40) + k_legacy -= 40 + if (legacy === k_legacy) + ++n + } + + let y = (n === 1) ? 50 : (n === 2) ? 40 : 30 for (let k = 0; k < pi; ++k) { let k_legacy = view.legacy[k] + if (k_legacy > 80) + k_legacy -= 40 if (k_legacy > 40) k_legacy -= 40 if (legacy === k_legacy) @@ -982,12 +995,15 @@ function on_update() { ui.legacy[pi].style.left = Math.round(43 + legacy * 60.2) + "px" ui.legacy[pi].style.top = 2 + y + "px" - y = 30 - for (let k = 0; k < pi; ++k) { - let k_turns = view.emperor_turns[k] - if (turns === k_turns) + n = 0 + for (let k = 0; k < player_count; ++k) + if (turns === view.emperor_turns[k]) + ++n + + y = (n === 1) ? 50 : (n === 2) ? 40 : 30 + for (let k = 0; k < pi; ++k) + if (turns === view.emperor_turns[k]) y += 20 - } show(ui.emperor_turns[pi]) ui.emperor_turns[pi].style.left = Math.round(41 + turns * 60.2) + "px" |