summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.css4
-rw-r--r--play.js20
-rw-r--r--rules.js2
3 files changed, 25 insertions, 1 deletions
diff --git a/play.css b/play.css
index 8d8899f..d39543a 100644
--- a/play.css
+++ b/play.css
@@ -147,6 +147,10 @@ body.America header.your_turn { background-color: hsl(211, 50%, 75%) }
filter: drop-shadow(1px 1px 2px #0008);
}
+.marker.congress {
+ pointer-events: none;
+}
+
.marker.cu {
pointer-events: none;
width: calc(60px - 8px - 8px);
diff --git a/play.js b/play.js
index 659a335..d1f0ff4 100644
--- a/play.js
+++ b/play.js
@@ -298,6 +298,8 @@ function on_init() {
ui.b_colony[i] = build_marker("marker small control british", x, y, 45+2, 45+2)
}
+ ui.congress = build_piece("marker large congress", 55+2, 55+2)
+ ui.french_navy = build_piece("marker large french_navy", 55+2, 55+2)
ui.turn_marker = build_piece("marker large turn", 55+2, 55+2)
ui.french_alliance = build_piece("marker large french_alliance", 55+2, 55+2)
}
@@ -380,6 +382,10 @@ function general_total(g) {
function on_update() {
let e
+ remember_position(ui.turn_marker)
+ remember_position(ui.french_alliance)
+ remember_position(ui.french_navy)
+ remember_position(ui.congress)
remember_position(ui.b_mcu)
remember_position(ui.a_mcu)
remember_position(ui.f_mcu)
@@ -396,7 +402,21 @@ function on_update() {
for (let s = 0; s < data.spaces.length; ++s) {
toggle_marker(ui.b_pc[s], has_british_pc(s))
toggle_marker(ui.a_pc[s], has_american_pc(s))
+ }
+
+ if (view.congress === CONTINENTAL_CONGRESS_DISPERSED)
+ show_marker_at(ui.congress, data.spaces[view.congress].x, data.spaces[view.congress].y)
+ else
+ show_marker_at(ui.congress, data.spaces[view.congress].x+20, data.spaces[view.congress].y-10)
+ if (view.french_navy < 0)
+ show_marker_at(ui.french_navy, data.spaces[FRENCH_REINFORCEMENTS].x-65, data.spaces[FRENCH_REINFORCEMENTS].y)
+ else if (view.french_navy > 1700)
+ show_marker_at_xy(ui.french_navy, data.layout.turn[view.french_navy])
+ else
+ show_marker_at(ui.french_navy, data.layout.sea[view.french_navy][0]-15, data.layout.sea[view.french_navy][1]+42)
+
+ for (let s = 0; s < data.spaces.length; ++s) {
if (view.move && view.move.to === s) {
toggle_marker_with_number(ui.a_cu[s], count_american_cu(s) - view.move.carry_american)
toggle_marker_with_number(ui.f_cu[s], count_french_cu(s) - view.move.carry_french)
diff --git a/rules.js b/rules.js
index e9a1d24..2fd69a5 100644
--- a/rules.js
+++ b/rules.js
@@ -1139,7 +1139,7 @@ function automatic_victory() {
function goto_start_year() {
logbr()
- log("# Year " + game.year)
+ log("=t Year " + game.year)
logbr()
// Prisoner exchange