From c90f1e3a43709736d7a61c517e94f19b2dff8e8e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 7 Oct 2023 15:34:29 +0200 Subject: 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. --- play.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'play.js') 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" -- cgit v1.2.3