summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--README5
-rw-r--r--about.html15
-rw-r--r--air-helo_track.pngbin0 -> 4747 bytes
-rw-r--r--algeria2.pngbin0 -> 5544867 bytes
-rw-r--r--counters/air_avail.pngbin0 -> 8903 bytes
-rw-r--r--counters/air_max.pngbin0 -> 8934 bytes
-rw-r--r--counters/airmobl.pngbin0 -> 7978 bytes
-rw-r--r--counters/ap.pngbin0 -> 6923 bytes
-rw-r--r--counters/border.pngbin0 -> 4916 bytes
-rw-r--r--counters/cadre.pngbin0 -> 9272 bytes
-rw-r--r--counters/company.pngbin0 -> 8126 bytes
-rw-r--r--counters/control.pngbin0 -> 2283 bytes
-rw-r--r--counters/control_fr.pngbin0 -> 2066 bytes
-rw-r--r--counters/disrupted.pngbin0 -> 562 bytes
-rw-r--r--counters/fr_al_5_mob_inf.pngbin0 -> 8513 bytes
-rw-r--r--counters/fr_al_7_mob_arm.pngbin0 -> 8465 bytes
-rw-r--r--counters/fr_al_static.pngbin0 -> 8147 bytes
-rw-r--r--counters/fr_div_25.pngbin0 -> 9054 bytes
-rw-r--r--counters/fr_div_7_inf.pngbin0 -> 8541 bytes
-rw-r--r--counters/fr_elite_10.pngbin0 -> 9169 bytes
-rw-r--r--counters/fr_elite_9_inf.pngbin0 -> 9110 bytes
-rw-r--r--counters/fr_elite_9_mar.pngbin0 -> 8822 bytes
-rw-r--r--counters/fr_elite_9_para.pngbin0 -> 9226 bytes
-rw-r--r--counters/fr_reg_6_inf.pngbin0 -> 7937 bytes
-rw-r--r--counters/front.pngbin0 -> 7628 bytes
-rw-r--r--counters/helo_avail.pngbin0 -> 8493 bytes
-rw-r--r--counters/helo_max.pngbin0 -> 8561 bytes
-rw-r--r--counters/naval.pngbin0 -> 7947 bytes
-rw-r--r--counters/neut.pngbin0 -> 357 bytes
-rw-r--r--counters/neutralized.pngbin0 -> 500 bytes
-rw-r--r--counters/oas.pngbin0 -> 9717 bytes
-rw-r--r--counters/oas_fln.pngbin0 -> 8051 bytes
-rw-r--r--counters/oas_fr.pngbin0 -> 8001 bytes
-rw-r--r--counters/psl.pngbin0 -> 7156 bytes
-rw-r--r--counters/psl_fr.pngbin0 -> 6636 bytes
-rw-r--r--counters/remote.pngbin0 -> 2335 bytes
-rw-r--r--counters/terror.pngbin0 -> 2760 bytes
-rw-r--r--cover.1x.jpgbin0 -> 15913 bytes
-rw-r--r--cover.2x.jpgbin0 -> 39497 bytes
-rw-r--r--cover.jpgbin0 -> 58877 bytes
-rw-r--r--create.html0
-rw-r--r--info/algeria_en_v1.2.pdfbin0 -> 1792597 bytes
-rw-r--r--info/charts.html12
-rw-r--r--info/coup.pngbin0 -> 15012 bytes
-rw-r--r--info/crt.pngbin0 -> 21730 bytes
-rw-r--r--info/depreciation.pngbin0 -> 21446 bytes
-rw-r--r--info/fln_costs.pngbin0 -> 52102 bytes
-rw-r--r--info/fln_missions.pngbin0 -> 60747 bytes
-rw-r--r--info/fra_missions.pngbin0 -> 102597 bytes
-rw-r--r--info/legend.pngbin0 -> 240312 bytes
-rw-r--r--info/maintain.pngbin0 -> 59659 bytes
-rw-r--r--info/mst.pngbin0 -> 5063 bytes
-rw-r--r--info/pax.pngbin0 -> 27377 bytes
-rw-r--r--info/psl_adj.pngbin0 -> 272976 bytes
-rw-r--r--info/random.pngbin0 -> 282085 bytes
-rw-r--r--info/recovery.pngbin0 -> 11964 bytes
-rw-r--r--play.html168
-rw-r--r--psl_track.pngbin0 -> 28789 bytes
-rw-r--r--rules.js66
-rw-r--r--thumbnail.jpgbin0 -> 10578 bytes
-rw-r--r--title.sql2
62 files changed, 269 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e43b0f9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store
diff --git a/README b/README
new file mode 100644
index 0000000..3b1ba9a
--- /dev/null
+++ b/README
@@ -0,0 +1,5 @@
+This game is implemented with the generous permission of Brian Train.
+
+Rules and art assets are Copyright 2020 Brian Train.
+
+Source code to this digital implementation is Copyright 2023 Mischa Untaga.
diff --git a/about.html b/about.html
new file mode 100644
index 0000000..06831ff
--- /dev/null
+++ b/about.html
@@ -0,0 +1,15 @@
+<p>
+"Algeria: The War of Independence 1954-1962" is a 2 players wargame simulating the conflict between the FLN Arab
+nationalist guerrillas and the French government from 1954 to 1962. During the game, the FLN player tries to erode the
+authority of the French colonial authorities and replace their governing structures with his own, to the point that
+Algeria makes the transition from being the 10th department of France to national independence.
+
+<br clear="left">
+
+<p>
+Game Design by Brian Train.
+
+<ul>
+<li><a href="/algeria/info/algeria_en_v1.2.pdf">Rulebook</a>
+<li><a href="/algeria/info/charts.html">Charts</a>
+</ul>
diff --git a/air-helo_track.png b/air-helo_track.png
new file mode 100644
index 0000000..b24fcf1
--- /dev/null
+++ b/air-helo_track.png
Binary files differ
diff --git a/algeria2.png b/algeria2.png
new file mode 100644
index 0000000..6e761b6
--- /dev/null
+++ b/algeria2.png
Binary files differ
diff --git a/counters/air_avail.png b/counters/air_avail.png
new file mode 100644
index 0000000..f96a662
--- /dev/null
+++ b/counters/air_avail.png
Binary files differ
diff --git a/counters/air_max.png b/counters/air_max.png
new file mode 100644
index 0000000..de211b5
--- /dev/null
+++ b/counters/air_max.png
Binary files differ
diff --git a/counters/airmobl.png b/counters/airmobl.png
new file mode 100644
index 0000000..d7fa87b
--- /dev/null
+++ b/counters/airmobl.png
Binary files differ
diff --git a/counters/ap.png b/counters/ap.png
new file mode 100644
index 0000000..8d383a1
--- /dev/null
+++ b/counters/ap.png
Binary files differ
diff --git a/counters/border.png b/counters/border.png
new file mode 100644
index 0000000..d51d3ad
--- /dev/null
+++ b/counters/border.png
Binary files differ
diff --git a/counters/cadre.png b/counters/cadre.png
new file mode 100644
index 0000000..93a6fe0
--- /dev/null
+++ b/counters/cadre.png
Binary files differ
diff --git a/counters/company.png b/counters/company.png
new file mode 100644
index 0000000..cd2276c
--- /dev/null
+++ b/counters/company.png
Binary files differ
diff --git a/counters/control.png b/counters/control.png
new file mode 100644
index 0000000..3211d08
--- /dev/null
+++ b/counters/control.png
Binary files differ
diff --git a/counters/control_fr.png b/counters/control_fr.png
new file mode 100644
index 0000000..2429a7e
--- /dev/null
+++ b/counters/control_fr.png
Binary files differ
diff --git a/counters/disrupted.png b/counters/disrupted.png
new file mode 100644
index 0000000..e82a101
--- /dev/null
+++ b/counters/disrupted.png
Binary files differ
diff --git a/counters/fr_al_5_mob_inf.png b/counters/fr_al_5_mob_inf.png
new file mode 100644
index 0000000..483c17a
--- /dev/null
+++ b/counters/fr_al_5_mob_inf.png
Binary files differ
diff --git a/counters/fr_al_7_mob_arm.png b/counters/fr_al_7_mob_arm.png
new file mode 100644
index 0000000..4369c89
--- /dev/null
+++ b/counters/fr_al_7_mob_arm.png
Binary files differ
diff --git a/counters/fr_al_static.png b/counters/fr_al_static.png
new file mode 100644
index 0000000..2c60916
--- /dev/null
+++ b/counters/fr_al_static.png
Binary files differ
diff --git a/counters/fr_div_25.png b/counters/fr_div_25.png
new file mode 100644
index 0000000..e16117e
--- /dev/null
+++ b/counters/fr_div_25.png
Binary files differ
diff --git a/counters/fr_div_7_inf.png b/counters/fr_div_7_inf.png
new file mode 100644
index 0000000..c069901
--- /dev/null
+++ b/counters/fr_div_7_inf.png
Binary files differ
diff --git a/counters/fr_elite_10.png b/counters/fr_elite_10.png
new file mode 100644
index 0000000..bba4598
--- /dev/null
+++ b/counters/fr_elite_10.png
Binary files differ
diff --git a/counters/fr_elite_9_inf.png b/counters/fr_elite_9_inf.png
new file mode 100644
index 0000000..3b0b861
--- /dev/null
+++ b/counters/fr_elite_9_inf.png
Binary files differ
diff --git a/counters/fr_elite_9_mar.png b/counters/fr_elite_9_mar.png
new file mode 100644
index 0000000..551300f
--- /dev/null
+++ b/counters/fr_elite_9_mar.png
Binary files differ
diff --git a/counters/fr_elite_9_para.png b/counters/fr_elite_9_para.png
new file mode 100644
index 0000000..f2497c2
--- /dev/null
+++ b/counters/fr_elite_9_para.png
Binary files differ
diff --git a/counters/fr_reg_6_inf.png b/counters/fr_reg_6_inf.png
new file mode 100644
index 0000000..63f0b27
--- /dev/null
+++ b/counters/fr_reg_6_inf.png
Binary files differ
diff --git a/counters/front.png b/counters/front.png
new file mode 100644
index 0000000..9089430
--- /dev/null
+++ b/counters/front.png
Binary files differ
diff --git a/counters/helo_avail.png b/counters/helo_avail.png
new file mode 100644
index 0000000..6fff09a
--- /dev/null
+++ b/counters/helo_avail.png
Binary files differ
diff --git a/counters/helo_max.png b/counters/helo_max.png
new file mode 100644
index 0000000..86ff578
--- /dev/null
+++ b/counters/helo_max.png
Binary files differ
diff --git a/counters/naval.png b/counters/naval.png
new file mode 100644
index 0000000..3d04664
--- /dev/null
+++ b/counters/naval.png
Binary files differ
diff --git a/counters/neut.png b/counters/neut.png
new file mode 100644
index 0000000..f70612e
--- /dev/null
+++ b/counters/neut.png
Binary files differ
diff --git a/counters/neutralized.png b/counters/neutralized.png
new file mode 100644
index 0000000..e1b4e24
--- /dev/null
+++ b/counters/neutralized.png
Binary files differ
diff --git a/counters/oas.png b/counters/oas.png
new file mode 100644
index 0000000..664fbc4
--- /dev/null
+++ b/counters/oas.png
Binary files differ
diff --git a/counters/oas_fln.png b/counters/oas_fln.png
new file mode 100644
index 0000000..a9f8ed7
--- /dev/null
+++ b/counters/oas_fln.png
Binary files differ
diff --git a/counters/oas_fr.png b/counters/oas_fr.png
new file mode 100644
index 0000000..d35be29
--- /dev/null
+++ b/counters/oas_fr.png
Binary files differ
diff --git a/counters/psl.png b/counters/psl.png
new file mode 100644
index 0000000..9b9a97c
--- /dev/null
+++ b/counters/psl.png
Binary files differ
diff --git a/counters/psl_fr.png b/counters/psl_fr.png
new file mode 100644
index 0000000..6fec6c1
--- /dev/null
+++ b/counters/psl_fr.png
Binary files differ
diff --git a/counters/remote.png b/counters/remote.png
new file mode 100644
index 0000000..b92be31
--- /dev/null
+++ b/counters/remote.png
Binary files differ
diff --git a/counters/terror.png b/counters/terror.png
new file mode 100644
index 0000000..42ffd6a
--- /dev/null
+++ b/counters/terror.png
Binary files differ
diff --git a/cover.1x.jpg b/cover.1x.jpg
new file mode 100644
index 0000000..d2409a5
--- /dev/null
+++ b/cover.1x.jpg
Binary files differ
diff --git a/cover.2x.jpg b/cover.2x.jpg
new file mode 100644
index 0000000..055e0ab
--- /dev/null
+++ b/cover.2x.jpg
Binary files differ
diff --git a/cover.jpg b/cover.jpg
new file mode 100644
index 0000000..3810187
--- /dev/null
+++ b/cover.jpg
Binary files differ
diff --git a/create.html b/create.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/create.html
diff --git a/info/algeria_en_v1.2.pdf b/info/algeria_en_v1.2.pdf
new file mode 100644
index 0000000..831962a
--- /dev/null
+++ b/info/algeria_en_v1.2.pdf
Binary files differ
diff --git a/info/charts.html b/info/charts.html
new file mode 100644
index 0000000..201024b
--- /dev/null
+++ b/info/charts.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<title>Algeria Chart</title>
+<style>
+body { max-width: 50rem; margin: 2rem; }
+table { border-collapse: collapse; width: 100%; }
+th, td { border: 1px solid black; padding: 0 5px; }
+th { background-color: gainsboro; }
+</style>
+<body>
+<h1>Algeria Charts</h1>
+
+</body>
diff --git a/info/coup.png b/info/coup.png
new file mode 100644
index 0000000..e072832
--- /dev/null
+++ b/info/coup.png
Binary files differ
diff --git a/info/crt.png b/info/crt.png
new file mode 100644
index 0000000..3c4d603
--- /dev/null
+++ b/info/crt.png
Binary files differ
diff --git a/info/depreciation.png b/info/depreciation.png
new file mode 100644
index 0000000..ffd2b13
--- /dev/null
+++ b/info/depreciation.png
Binary files differ
diff --git a/info/fln_costs.png b/info/fln_costs.png
new file mode 100644
index 0000000..53e7587
--- /dev/null
+++ b/info/fln_costs.png
Binary files differ
diff --git a/info/fln_missions.png b/info/fln_missions.png
new file mode 100644
index 0000000..5c9e5f9
--- /dev/null
+++ b/info/fln_missions.png
Binary files differ
diff --git a/info/fra_missions.png b/info/fra_missions.png
new file mode 100644
index 0000000..abaa0d2
--- /dev/null
+++ b/info/fra_missions.png
Binary files differ
diff --git a/info/legend.png b/info/legend.png
new file mode 100644
index 0000000..d38438f
--- /dev/null
+++ b/info/legend.png
Binary files differ
diff --git a/info/maintain.png b/info/maintain.png
new file mode 100644
index 0000000..d50971d
--- /dev/null
+++ b/info/maintain.png
Binary files differ
diff --git a/info/mst.png b/info/mst.png
new file mode 100644
index 0000000..5b177ad
--- /dev/null
+++ b/info/mst.png
Binary files differ
diff --git a/info/pax.png b/info/pax.png
new file mode 100644
index 0000000..3ff55ff
--- /dev/null
+++ b/info/pax.png
Binary files differ
diff --git a/info/psl_adj.png b/info/psl_adj.png
new file mode 100644
index 0000000..35ae65e
--- /dev/null
+++ b/info/psl_adj.png
Binary files differ
diff --git a/info/random.png b/info/random.png
new file mode 100644
index 0000000..d77bc3e
--- /dev/null
+++ b/info/random.png
Binary files differ
diff --git a/info/recovery.png b/info/recovery.png
new file mode 100644
index 0000000..fd699a7
--- /dev/null
+++ b/info/recovery.png
Binary files differ
diff --git a/play.html b/play.html
new file mode 100644
index 0000000..bddb39b
--- /dev/null
+++ b/play.html
@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<!-- vim:set nowrap: -->
+<html>
+<head>
+<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
+<meta charset="UTF-8">
+<title>ALGERIA</title>
+<link rel="icon" href="favicon.png">
+<link rel="stylesheet" href="/fonts/fonts.css">
+<link rel="stylesheet" href="/common/play.css">
+<script defer src="/common/play.js"></script>
+<script defer src="play.js"></script>
+<style>
+
+main { background-color: dimgray }
+
+#role_Red .role_name { background-color: salmon; }
+#role_Blue .role_name { background-color: skyblue; }
+
+#mapwrap {
+ width: 1100px;
+ height: 850px;
+ box-shadow: 0px 1px 10px #0008;
+}
+
+#map {
+ width: 1100px;
+ height: 850px;
+ background-image: url(map100.png);
+}
+
+#map div {
+ position: absolute;
+ transition-property: top, left;
+ transition-duration: 1s;
+ transition-timing-function: ease;
+}
+
+.token {
+ width: 58px;
+ height: 64px;
+ background-size: 58px 64px;
+ filter: drop-shadow(0px 2px 4px #0008);
+}
+
+.tile {
+ width: 75px;
+ height: 75px;
+ background-repeat: no-repeat;
+ background-size: 50px 50px;
+ background-position: center;
+ border-width: 2px;
+ border-style: solid;
+ box-shadow: 0 0 0 1px #222, 1px 2px 4px #0008;
+}
+
+.token.white { background-image: url(images/token_white.svg) }
+.token.red { background-image: url(images/token_red.svg) }
+.token.blue { background-image: url(images/token_blue.svg) }
+
+.tile.white { background-image: url(images/tile_white.png) }
+.tile.red { background-image: url(images/tile_red.png) }
+.tile.blue { background-image: url(images/tile_blue.png) }
+.tile.gold { background-image: url(images/tile_gold.png) }
+.tile.green { background-image: url(images/tile_green.png) }
+
+.tile.red { background-color: hsl(0,90%,49%); border-color: hsl(0,90%,59%) hsl(0,90%,39%) hsl(0,90%,39%) hsl(0,90%,59%); }
+.tile.white { background-color: hsl(0,0%,94%); border-color: hsl(0,0%,100%) hsl(0,0%,84%) hsl(0,0%,84%) hsl(0,0%,100%); }
+.tile.blue { background-color: hsl(201,80%,47%); border-color: hsl(201,80%,57%) hsl(201,80%,37%) hsl(201,80%,37%) hsl(201,80%,57%); }
+.tile.gold { background-color: hsl(50,81%,59%); border-color: hsl(50,81%,69%) hsl(50,81%,49%) hsl(50,81%,49%) hsl(50,81%,69%); }
+.tile.green { background-color: hsl(125,21%,33%); border-color: hsl(125,21%,43%) hsl(125,21%,23%) hsl(125,21%,23%) hsl(125,21%,43%); }
+
+.panel {
+ max-width: 1100px;
+ margin: 36px auto;
+ background-color: #555;
+}
+
+.panel_header {
+ background-color: #444;
+ color: white;
+ user-select: none;
+ font-weight: bold;
+ text-align: center;
+ padding: 3px 1em;
+}
+
+.panel_body {
+ display: flex;
+ justify-content: start;
+ flex-wrap: wrap;
+ padding: 20px;
+ gap: 20px;
+}
+
+</style>
+</head>
+<body>
+
+<header>
+ <div id="toolbar">
+ <div class="menu">
+ <div class="menu_title"><img src="/images/cog.svg"></div>
+ <div class="menu_popup">
+ <a class="menu_item" href="info/rules.html" target="_blank">Rules</a>
+ <a class="menu_item" href="info/charts.html" target="_blank">Charts</a>
+ <div class="resign menu_separator"></div>
+ <div class="resign menu_item" onclick="confirm_resign()">Resign</div>
+ </div>
+ </div>
+ <div class="icon_button" onclick="toggle_zoom()"><img src="/images/magnifying-glass.svg"></div>
+ </div>
+ <div id="prompt"></div>
+ <div id="actions"></div>
+</header>
+
+<aside>
+ <div id="roles">
+ <div class="role" id="role_Red">
+ <div class="role_name">
+ Red &#x2013;
+ <span class="role_user"></span>
+ </div>
+ </div>
+ <div class="role" id="role_Blue">
+ <div class="role_name">
+ Blue &#x2013;
+ <span class="role_user"></span>
+ </div>
+ </div>
+ </div>
+ <div id="log"></div>
+</aside>
+
+<main>
+
+<div id="mapwrap" class="">
+<div id="map">
+
+<div id="token_white" class="token white" style="left:90px;top:135px;"></div>
+<div id="token_red1" class="token red" style="left:200px"></div>
+<div id="token_red2" class="token red" style="left:300px"></div>
+<div id="token_red3" class="token red" style="left:400px"></div>
+<div id="token_blue1" class="token blue" style="left:500px"></div>
+<div id="token_blue2" class="token blue" style="left:600px"></div>
+<div id="token_blue3" class="token blue" style="left:700px"></div>
+
+</div>
+</div>
+
+<div id="hand_panel" class="panel">
+<div id="hand_header" class="panel_header">Hand</div>
+<div id="hand" class="panel_body">
+
+<div class="tile red" style="left:198px;top:300px"></div>
+<div class="tile blue" style="left:338px;top:300px"></div>
+<div class="tile green" style="left:478px;top:300px"></div>
+<div class="tile white" style="left:618px;top:300px"></div>
+<div class="tile gold" style="left:758px;top:300px"></div>
+
+</div>
+</div>
+
+</main>
+
+<footer id="status"></footer>
+
+</body>
diff --git a/psl_track.png b/psl_track.png
new file mode 100644
index 0000000..7825899
--- /dev/null
+++ b/psl_track.png
Binary files differ
diff --git a/rules.js b/rules.js
new file mode 100644
index 0000000..8bc5bf9
--- /dev/null
+++ b/rules.js
@@ -0,0 +1,66 @@
+"use strict"
+
+const RED = "Red"
+const BLUE = "Blue"
+
+var game, states
+
+exports.scenarios = [ "Standard" ]
+
+exports.roles = [ RED, BLUE ]
+
+exports.setup = function (seed, scenario, options) {
+ game = {
+ seed: seed,
+ state: null,
+ log: [],
+ undo: [],
+ }
+ return game
+}
+
+exports.action = function (state, player, action, arg) {
+ game = state
+ let S = states[game.state]
+ if (action in S)
+ S[action](arg, player)
+ else
+ throw new Error("Invalid action: " + action)
+ return game
+}
+
+exports.resign = function (state, player) {
+ game = state
+ if (game.state !== 'game_over') {
+ if (player === RED)
+ goto_game_over(BLUE, "Red resigned.")
+ if (player === BLUE)
+ goto_game_over(RED, "Blue resigned.")
+ }
+ return game
+}
+
+exports.view = function(state, player) {
+ game = state
+
+ let view = {
+ log: game.log,
+ prompt: null,
+ }
+
+ if (game.state === "game_over") {
+ view.prompt = game.victory
+ } else if (player !== game.active) {
+ let inactive = states[game.state].inactive || game.state
+ view.prompt = `Waiting for ${game.active} \u2014 ${inactive}...`
+ } else {
+ view.actions = {}
+ states[game.state].prompt()
+ if (game.undo && game.undo.length > 0)
+ view.actions.undo = 1
+ else
+ view.actions.undo = 0
+ }
+
+ return view;
+}
diff --git a/thumbnail.jpg b/thumbnail.jpg
new file mode 100644
index 0000000..9347f89
--- /dev/null
+++ b/thumbnail.jpg
Binary files differ
diff --git a/title.sql b/title.sql
new file mode 100644
index 0000000..6efc83d
--- /dev/null
+++ b/title.sql
@@ -0,0 +1,2 @@
+insert or ignore into titles ( title_id, title_name, bgg ) values ( 'algeria', 'Algeria', 11293 );
+