diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-09-05 11:10:54 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-09-05 11:10:54 +0200 |
commit | 627225aead0401f59789658e541f960afd94837c (patch) | |
tree | 6535ff73b15bda0a0a34c7f7b5b3418b3f8b2cc2 | |
download | algeria-627225aead0401f59789658e541f960afd94837c.tar.gz |
Initial commit
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | about.html | 15 | ||||
-rw-r--r-- | air-helo_track.png | bin | 0 -> 4747 bytes | |||
-rw-r--r-- | algeria2.png | bin | 0 -> 5544867 bytes | |||
-rw-r--r-- | counters/air_avail.png | bin | 0 -> 8903 bytes | |||
-rw-r--r-- | counters/air_max.png | bin | 0 -> 8934 bytes | |||
-rw-r--r-- | counters/airmobl.png | bin | 0 -> 7978 bytes | |||
-rw-r--r-- | counters/ap.png | bin | 0 -> 6923 bytes | |||
-rw-r--r-- | counters/border.png | bin | 0 -> 4916 bytes | |||
-rw-r--r-- | counters/cadre.png | bin | 0 -> 9272 bytes | |||
-rw-r--r-- | counters/company.png | bin | 0 -> 8126 bytes | |||
-rw-r--r-- | counters/control.png | bin | 0 -> 2283 bytes | |||
-rw-r--r-- | counters/control_fr.png | bin | 0 -> 2066 bytes | |||
-rw-r--r-- | counters/disrupted.png | bin | 0 -> 562 bytes | |||
-rw-r--r-- | counters/fr_al_5_mob_inf.png | bin | 0 -> 8513 bytes | |||
-rw-r--r-- | counters/fr_al_7_mob_arm.png | bin | 0 -> 8465 bytes | |||
-rw-r--r-- | counters/fr_al_static.png | bin | 0 -> 8147 bytes | |||
-rw-r--r-- | counters/fr_div_25.png | bin | 0 -> 9054 bytes | |||
-rw-r--r-- | counters/fr_div_7_inf.png | bin | 0 -> 8541 bytes | |||
-rw-r--r-- | counters/fr_elite_10.png | bin | 0 -> 9169 bytes | |||
-rw-r--r-- | counters/fr_elite_9_inf.png | bin | 0 -> 9110 bytes | |||
-rw-r--r-- | counters/fr_elite_9_mar.png | bin | 0 -> 8822 bytes | |||
-rw-r--r-- | counters/fr_elite_9_para.png | bin | 0 -> 9226 bytes | |||
-rw-r--r-- | counters/fr_reg_6_inf.png | bin | 0 -> 7937 bytes | |||
-rw-r--r-- | counters/front.png | bin | 0 -> 7628 bytes | |||
-rw-r--r-- | counters/helo_avail.png | bin | 0 -> 8493 bytes | |||
-rw-r--r-- | counters/helo_max.png | bin | 0 -> 8561 bytes | |||
-rw-r--r-- | counters/naval.png | bin | 0 -> 7947 bytes | |||
-rw-r--r-- | counters/neut.png | bin | 0 -> 357 bytes | |||
-rw-r--r-- | counters/neutralized.png | bin | 0 -> 500 bytes | |||
-rw-r--r-- | counters/oas.png | bin | 0 -> 9717 bytes | |||
-rw-r--r-- | counters/oas_fln.png | bin | 0 -> 8051 bytes | |||
-rw-r--r-- | counters/oas_fr.png | bin | 0 -> 8001 bytes | |||
-rw-r--r-- | counters/psl.png | bin | 0 -> 7156 bytes | |||
-rw-r--r-- | counters/psl_fr.png | bin | 0 -> 6636 bytes | |||
-rw-r--r-- | counters/remote.png | bin | 0 -> 2335 bytes | |||
-rw-r--r-- | counters/terror.png | bin | 0 -> 2760 bytes | |||
-rw-r--r-- | cover.1x.jpg | bin | 0 -> 15913 bytes | |||
-rw-r--r-- | cover.2x.jpg | bin | 0 -> 39497 bytes | |||
-rw-r--r-- | cover.jpg | bin | 0 -> 58877 bytes | |||
-rw-r--r-- | create.html | 0 | ||||
-rw-r--r-- | info/algeria_en_v1.2.pdf | bin | 0 -> 1792597 bytes | |||
-rw-r--r-- | info/charts.html | 12 | ||||
-rw-r--r-- | info/coup.png | bin | 0 -> 15012 bytes | |||
-rw-r--r-- | info/crt.png | bin | 0 -> 21730 bytes | |||
-rw-r--r-- | info/depreciation.png | bin | 0 -> 21446 bytes | |||
-rw-r--r-- | info/fln_costs.png | bin | 0 -> 52102 bytes | |||
-rw-r--r-- | info/fln_missions.png | bin | 0 -> 60747 bytes | |||
-rw-r--r-- | info/fra_missions.png | bin | 0 -> 102597 bytes | |||
-rw-r--r-- | info/legend.png | bin | 0 -> 240312 bytes | |||
-rw-r--r-- | info/maintain.png | bin | 0 -> 59659 bytes | |||
-rw-r--r-- | info/mst.png | bin | 0 -> 5063 bytes | |||
-rw-r--r-- | info/pax.png | bin | 0 -> 27377 bytes | |||
-rw-r--r-- | info/psl_adj.png | bin | 0 -> 272976 bytes | |||
-rw-r--r-- | info/random.png | bin | 0 -> 282085 bytes | |||
-rw-r--r-- | info/recovery.png | bin | 0 -> 11964 bytes | |||
-rw-r--r-- | play.html | 168 | ||||
-rw-r--r-- | psl_track.png | bin | 0 -> 28789 bytes | |||
-rw-r--r-- | rules.js | 66 | ||||
-rw-r--r-- | thumbnail.jpg | bin | 0 -> 10578 bytes | |||
-rw-r--r-- | title.sql | 2 |
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 @@ -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 Binary files differnew file mode 100644 index 0000000..b24fcf1 --- /dev/null +++ b/air-helo_track.png diff --git a/algeria2.png b/algeria2.png Binary files differnew file mode 100644 index 0000000..6e761b6 --- /dev/null +++ b/algeria2.png diff --git a/counters/air_avail.png b/counters/air_avail.png Binary files differnew file mode 100644 index 0000000..f96a662 --- /dev/null +++ b/counters/air_avail.png diff --git a/counters/air_max.png b/counters/air_max.png Binary files differnew file mode 100644 index 0000000..de211b5 --- /dev/null +++ b/counters/air_max.png diff --git a/counters/airmobl.png b/counters/airmobl.png Binary files differnew file mode 100644 index 0000000..d7fa87b --- /dev/null +++ b/counters/airmobl.png diff --git a/counters/ap.png b/counters/ap.png Binary files differnew file mode 100644 index 0000000..8d383a1 --- /dev/null +++ b/counters/ap.png diff --git a/counters/border.png b/counters/border.png Binary files differnew file mode 100644 index 0000000..d51d3ad --- /dev/null +++ b/counters/border.png diff --git a/counters/cadre.png b/counters/cadre.png Binary files differnew file mode 100644 index 0000000..93a6fe0 --- /dev/null +++ b/counters/cadre.png diff --git a/counters/company.png b/counters/company.png Binary files differnew file mode 100644 index 0000000..cd2276c --- /dev/null +++ b/counters/company.png diff --git a/counters/control.png b/counters/control.png Binary files differnew file mode 100644 index 0000000..3211d08 --- /dev/null +++ b/counters/control.png diff --git a/counters/control_fr.png b/counters/control_fr.png Binary files differnew file mode 100644 index 0000000..2429a7e --- /dev/null +++ b/counters/control_fr.png diff --git a/counters/disrupted.png b/counters/disrupted.png Binary files differnew file mode 100644 index 0000000..e82a101 --- /dev/null +++ b/counters/disrupted.png diff --git a/counters/fr_al_5_mob_inf.png b/counters/fr_al_5_mob_inf.png Binary files differnew file mode 100644 index 0000000..483c17a --- /dev/null +++ b/counters/fr_al_5_mob_inf.png diff --git a/counters/fr_al_7_mob_arm.png b/counters/fr_al_7_mob_arm.png Binary files differnew file mode 100644 index 0000000..4369c89 --- /dev/null +++ b/counters/fr_al_7_mob_arm.png diff --git a/counters/fr_al_static.png b/counters/fr_al_static.png Binary files differnew file mode 100644 index 0000000..2c60916 --- /dev/null +++ b/counters/fr_al_static.png diff --git a/counters/fr_div_25.png b/counters/fr_div_25.png Binary files differnew file mode 100644 index 0000000..e16117e --- /dev/null +++ b/counters/fr_div_25.png diff --git a/counters/fr_div_7_inf.png b/counters/fr_div_7_inf.png Binary files differnew file mode 100644 index 0000000..c069901 --- /dev/null +++ b/counters/fr_div_7_inf.png diff --git a/counters/fr_elite_10.png b/counters/fr_elite_10.png Binary files differnew file mode 100644 index 0000000..bba4598 --- /dev/null +++ b/counters/fr_elite_10.png diff --git a/counters/fr_elite_9_inf.png b/counters/fr_elite_9_inf.png Binary files differnew file mode 100644 index 0000000..3b0b861 --- /dev/null +++ b/counters/fr_elite_9_inf.png diff --git a/counters/fr_elite_9_mar.png b/counters/fr_elite_9_mar.png Binary files differnew file mode 100644 index 0000000..551300f --- /dev/null +++ b/counters/fr_elite_9_mar.png diff --git a/counters/fr_elite_9_para.png b/counters/fr_elite_9_para.png Binary files differnew file mode 100644 index 0000000..f2497c2 --- /dev/null +++ b/counters/fr_elite_9_para.png diff --git a/counters/fr_reg_6_inf.png b/counters/fr_reg_6_inf.png Binary files differnew file mode 100644 index 0000000..63f0b27 --- /dev/null +++ b/counters/fr_reg_6_inf.png diff --git a/counters/front.png b/counters/front.png Binary files differnew file mode 100644 index 0000000..9089430 --- /dev/null +++ b/counters/front.png diff --git a/counters/helo_avail.png b/counters/helo_avail.png Binary files differnew file mode 100644 index 0000000..6fff09a --- /dev/null +++ b/counters/helo_avail.png diff --git a/counters/helo_max.png b/counters/helo_max.png Binary files differnew file mode 100644 index 0000000..86ff578 --- /dev/null +++ b/counters/helo_max.png diff --git a/counters/naval.png b/counters/naval.png Binary files differnew file mode 100644 index 0000000..3d04664 --- /dev/null +++ b/counters/naval.png diff --git a/counters/neut.png b/counters/neut.png Binary files differnew file mode 100644 index 0000000..f70612e --- /dev/null +++ b/counters/neut.png diff --git a/counters/neutralized.png b/counters/neutralized.png Binary files differnew file mode 100644 index 0000000..e1b4e24 --- /dev/null +++ b/counters/neutralized.png diff --git a/counters/oas.png b/counters/oas.png Binary files differnew file mode 100644 index 0000000..664fbc4 --- /dev/null +++ b/counters/oas.png diff --git a/counters/oas_fln.png b/counters/oas_fln.png Binary files differnew file mode 100644 index 0000000..a9f8ed7 --- /dev/null +++ b/counters/oas_fln.png diff --git a/counters/oas_fr.png b/counters/oas_fr.png Binary files differnew file mode 100644 index 0000000..d35be29 --- /dev/null +++ b/counters/oas_fr.png diff --git a/counters/psl.png b/counters/psl.png Binary files differnew file mode 100644 index 0000000..9b9a97c --- /dev/null +++ b/counters/psl.png diff --git a/counters/psl_fr.png b/counters/psl_fr.png Binary files differnew file mode 100644 index 0000000..6fec6c1 --- /dev/null +++ b/counters/psl_fr.png diff --git a/counters/remote.png b/counters/remote.png Binary files differnew file mode 100644 index 0000000..b92be31 --- /dev/null +++ b/counters/remote.png diff --git a/counters/terror.png b/counters/terror.png Binary files differnew file mode 100644 index 0000000..42ffd6a --- /dev/null +++ b/counters/terror.png diff --git a/cover.1x.jpg b/cover.1x.jpg Binary files differnew file mode 100644 index 0000000..d2409a5 --- /dev/null +++ b/cover.1x.jpg diff --git a/cover.2x.jpg b/cover.2x.jpg Binary files differnew file mode 100644 index 0000000..055e0ab --- /dev/null +++ b/cover.2x.jpg diff --git a/cover.jpg b/cover.jpg Binary files differnew file mode 100644 index 0000000..3810187 --- /dev/null +++ b/cover.jpg 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 Binary files differnew file mode 100644 index 0000000..831962a --- /dev/null +++ b/info/algeria_en_v1.2.pdf 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 Binary files differnew file mode 100644 index 0000000..e072832 --- /dev/null +++ b/info/coup.png diff --git a/info/crt.png b/info/crt.png Binary files differnew file mode 100644 index 0000000..3c4d603 --- /dev/null +++ b/info/crt.png diff --git a/info/depreciation.png b/info/depreciation.png Binary files differnew file mode 100644 index 0000000..ffd2b13 --- /dev/null +++ b/info/depreciation.png diff --git a/info/fln_costs.png b/info/fln_costs.png Binary files differnew file mode 100644 index 0000000..53e7587 --- /dev/null +++ b/info/fln_costs.png diff --git a/info/fln_missions.png b/info/fln_missions.png Binary files differnew file mode 100644 index 0000000..5c9e5f9 --- /dev/null +++ b/info/fln_missions.png diff --git a/info/fra_missions.png b/info/fra_missions.png Binary files differnew file mode 100644 index 0000000..abaa0d2 --- /dev/null +++ b/info/fra_missions.png diff --git a/info/legend.png b/info/legend.png Binary files differnew file mode 100644 index 0000000..d38438f --- /dev/null +++ b/info/legend.png diff --git a/info/maintain.png b/info/maintain.png Binary files differnew file mode 100644 index 0000000..d50971d --- /dev/null +++ b/info/maintain.png diff --git a/info/mst.png b/info/mst.png Binary files differnew file mode 100644 index 0000000..5b177ad --- /dev/null +++ b/info/mst.png diff --git a/info/pax.png b/info/pax.png Binary files differnew file mode 100644 index 0000000..3ff55ff --- /dev/null +++ b/info/pax.png diff --git a/info/psl_adj.png b/info/psl_adj.png Binary files differnew file mode 100644 index 0000000..35ae65e --- /dev/null +++ b/info/psl_adj.png diff --git a/info/random.png b/info/random.png Binary files differnew file mode 100644 index 0000000..d77bc3e --- /dev/null +++ b/info/random.png diff --git a/info/recovery.png b/info/recovery.png Binary files differnew file mode 100644 index 0000000..fd699a7 --- /dev/null +++ b/info/recovery.png 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 – + <span class="role_user"></span> + </div> + </div> + <div class="role" id="role_Blue"> + <div class="role_name"> + Blue – + <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 Binary files differnew file mode 100644 index 0000000..7825899 --- /dev/null +++ b/psl_track.png 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 Binary files differnew file mode 100644 index 0000000..9347f89 --- /dev/null +++ b/thumbnail.jpg 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 ); + |