summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-07 15:34:29 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commitc90f1e3a43709736d7a61c517e94f19b2dff8e8e (patch)
treebdcf6f61c85bbc5c03da14647489c2c44e7bb2d3 /play.js
parent936a573b340afda735139318646cca057a6d2c03 (diff)
downloadplantagenet-c90f1e3a43709736d7a61c517e94f19b2dff8e8e.tar.gz
Fix P1/P2 vs York/Lancaster issues.
P1 and P2 are dynamically set to either York or Lancaster. Only use these to determine play order during steps. Use YORK or LANCASTER for everything else. Bugs fixed: * P1/P2 aliases were not set after setup is done, leaving them unset for first action since load_state doesn't call update_alias unless the state object changes. * goto_command_activation should only end after both players exhaust, not as soon as Lancaster has run out of cards. * current_hand was returning opponents hand if rebel is not York.
Diffstat (limited to 'play.js')
-rw-r--r--play.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/play.js b/play.js
index a184b44..aa4a352 100644
--- a/play.js
+++ b/play.js
@@ -1496,8 +1496,8 @@ function on_update() {
ui.end.style.left = (calendar_xy[view.end][0] + 91 - 52) + "px"
ui.end.style.top = (calendar_xy[view.end][1] + 94) + "px"
- ui.held_york.textContent = `${view.held1} Held`
- ui.held_lancaster.textContent = `${view.held2} Held`
+ ui.held_york.textContent = `${view.held_y} Held`
+ ui.held_lancaster.textContent = `${view.held_l} Held`
ui.victory_check.style.top = (track_xy[view.victory_check][1]) + "px"
ui.victory_check.style.left = (track_xy[view.victory_check][0]) + "px"