From 5193718ce475f03da5b80236f04818532357395c Mon Sep 17 00:00:00 2001 From: Eric Londaits Date: Thu, 21 Mar 2024 17:32:57 -0300 Subject: [PATCH] feat: Add a 'showDemo' config setting to activate demo mode. --- README.md | 1 + ...-68545de719.css => default-62a114e65a.css} | 3 +- assets/css/default-62a114e65a.css.map | 1 + assets/css/default-68545de719.css.map | 1 - assets/js/bundle-0dc89b22da.min.js | 2 + assets/js/bundle-0dc89b22da.min.js.map | 1 + assets/js/bundle-269e3ae9b2.min.js | 2 - assets/js/bundle-269e3ae9b2.min.js.map | 1 - assets/js/bundle.js | 84 ++++++++++--------- index.html | 4 +- src/js/game-mode-demo.js | 15 ++-- src/js/game-mode-title.js | 15 ++++ src/js/game.js | 15 ++-- src/pug/rev-manifest.scripts.json | 2 +- src/pug/rev-manifest.styles.json | 2 +- src/sass/_mod_app.scss | 1 + 16 files changed, 84 insertions(+), 66 deletions(-) rename assets/css/{default-68545de719.css => default-62a114e65a.css} (99%) create mode 100644 assets/css/default-62a114e65a.css.map delete mode 100644 assets/css/default-68545de719.css.map create mode 100644 assets/js/bundle-0dc89b22da.min.js create mode 100644 assets/js/bundle-0dc89b22da.min.js.map delete mode 100644 assets/js/bundle-269e3ae9b2.min.js delete mode 100644 assets/js/bundle-269e3ae9b2.min.js.map diff --git a/README.md b/README.md index 6181367..baf7f0f 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ A config file is loaded when opening the application. It supports the following supplied map. See [below](#setting-a-sea-floor-map) for details. - **continuousGame** (boolean, default: `false`): Skip the title screen and time limit, auto-restart. +- **showDemo** (boolean, default: `false`): Alternate between the title screen and demo mode. - **fullScreenButton** (boolean, default: `true`): Show a button to toggle full-screen mode. - **languageButton** (boolean, default: `true`): Show a button to cycle through the languages defined via `languages`. - **debugControls** (boolean, default: `false`): Shows debugging data for controls. diff --git a/assets/css/default-68545de719.css b/assets/css/default-62a114e65a.css similarity index 99% rename from assets/css/default-68545de719.css rename to assets/css/default-62a114e65a.css index baa7604..522b0b1 100644 --- a/assets/css/default-68545de719.css +++ b/assets/css/default-62a114e65a.css @@ -238,6 +238,7 @@ body { .title-press-to-start { position: absolute; top: 80%; + color: #33c6ff; } .menu-title { @@ -459,4 +460,4 @@ body { margin-top: -0.1ex; font-size: 188%; } -/*# sourceMappingURL=default-68545de719.css.map */ +/*# sourceMappingURL=default-62a114e65a.css.map */ diff --git a/assets/css/default-62a114e65a.css.map b/assets/css/default-62a114e65a.css.map new file mode 100644 index 0000000..8ddc618 --- /dev/null +++ b/assets/css/default-62a114e65a.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["_warning.scss","_util.scss","_util_exhibits.scss","_base.scss","_colors.scss","_mod_controls.scss","_mod_debug.scss","_mod_text.scss","_mod_app.scss","_fonts.scss","_mod_play.scss","_mod_language.scss","_mod_fullscreen.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;ACmCA;AAEA;AAAA;EAEI;EACA;;;AAEJ;EACI;;;AAEJ;AACA;EACI;;;AClDJ;EACE;EACA;EACA;EACA;;;ACGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE,OCba;EDcb,kBCpBiB;;;ADuBnB;EACE;IACE;;;AAIJ;EACE;IACE;;;AE/BJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA,ODRW;;ACUX;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;AAIJ;EACE;;AAEA;EACE;;AAMJ;EACE;;AAKF;EACE;;AAKF;EACE;;AAKF;EACE;;AAYJ;EAPE,OD3ES;;AC4ET;EACE,ODvEW;ECwEX;;AAQJ;EAXE,OD1EQ;;AC2ER;EACE,ODtEU;ECuEV;;AAYJ;EAfE,ODzEU;;AC0EV;EACE,ODrEY;ECsEZ;;AAgBJ;EAnBE,ODxEW;;ACyEX;EACE,ODpEa;ECqEb;;;ACvFN;EACE;EACA,OFIa;EEHb;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;IACA;IACA;;;AAIJ;EACE;IACE;IACA;IACA;;;ACxBJ;EACE;;;AAGF;EACE;EACA;;;AAIF;EACE;IAAQ;;EACR;IAAQ;;EACR;IAAQ;;EACR;IAAQ;;EACR;IAAQ;;;AAGV;EACE;;;ACnBF;ECCE;EACA;EDAA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA,kBJRU;EISV;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAIA;EACE;EACA;EACA;;AAIJ;EACE;EACA;;;AAKN;EChCE;EACA;EDiCA;EACA;;;AAGF;EAIE;EACA;EACA,OJ1CgB;;;AI6ClB;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE,cJhES;EIiET;EACA;;;AAKN;EACE;EACA;EACA;EACA,OJ1EiB;;;AMPnB;EACE;EACA;EACA;EACA;;;AAoBA;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AADlB;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AADlB;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AADlB;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AAIpB;EAjBE,ONNa;;AMQb;EACE,QNTW;;AMYb;EACE,MNbW;;;AM2Bf;EACE;EACA,MNhCY;;;AMmCd;EACE,QNjBY;;;AMoBd;EACE,QNpBa;EMqBb,MNzCY;;;AMgDd;EACE,QN5Be;;;AMgCf;EACE;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAIJ;EACE;IACE;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAGF;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGJ;EACE;;;AC/IN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;;ACnBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA","file":"default-62a114e65a.css","sourcesContent":["/*************************************************/\n/* This file was automatically generated by sass */\n/* Don't edit it directly */\n/*************************************************/","@mixin image-replace {\n display: block;\n text-align: left;\n text-indent: -100em;\n white-space: nowrap;\n overflow: hidden;\n background-repeat: no-repeat;\n}\n\n@mixin image-replace-src($image, $width, $height) {\n background-image: url($image);\n width: $width;\n height: $height;\n}\n\n@mixin opacity($opacity) {\n filter: unquote(\"progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})\");\n opacity: $opacity;\n}\n\n@mixin unselectable {\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n\n@mixin clearfix {\n &:before, &:after {\n content: \"\";\n display: table;\n }\n &:after {\n clear: both;\n }\n}\n\n/* Clearfix */\n\n.clearfix:before,\n.clearfix:after {\n content: \" \";\n display: table;\n}\n.clearfix:after {\n clear: both;\n}\n/* For IE 6/7 only */\n.clearfix {\n *zoom: 1;\n}\n","body.lock-position {\n height: 100%;\n overflow: hidden;\n width: 100%;\n position: fixed; // Needed to avoid scroll in iOS\n}","@use \"sass:math\";\n\n$width: 1920;\n$height: 1080;\n$aspect-ratio-wh: math.div($width, $height);\n$aspect-ratio-hw: math.div($height, $width);\n\n:root {\n color-scheme: light dark;\n}\n\nhtml, body {\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n}\n\nbody {\n color: $color-yellow;\n background-color: $color-black-real;\n}\n\n@media (min-aspect-ratio: #{$width} / #{$height}), (aspect-ratio: #{$width} / #{$height}) {\n body {\n font-size: 4vh;\n }\n}\n\n@media (max-aspect-ratio: #{$width} / #{$height}) {\n body {\n font-size: #{4 * $aspect-ratio-hw}vw;\n }\n}\n","$color-black-real: #000;\n$color-white-real: #fff;\n\n$color-black: #151515;\n$color-white: $color-white-real;\n\n$color-yellow: #ffec02;\n$color-yellow-dim: #8b811e;\n$color-turquoise: #33c6ff;\n$color-blue: #2197ff;\n$color-red: #ff2d2d;\n$color-green: #29da29;\n$color-orange: #FF8D18;\n\n$color-yellow-lit: #fffbcd;\n$color-blue-lit: #c2e2ff;\n$color-red-lit: #ffcaca;\n$color-green-lit: #b4ffb4;\n$color-orange-lit: #fad0a5;\n\n$color-bg: $color-black;\n\n$color-water: #9999ff;\n$color-ground: #ffe699;\n$color-treasure: #F99C2D;\n\n$color-player-0: $color-blue;\n$color-player-1: $color-red;\n$color-player-2: $color-green;\n$color-player-3: $color-orange;\n$color-player-bot: $color-yellow;\n\n@mixin neg {\n -webkit-font-smoothing: antialiased;\n}\n",".screen-controls {\n width: 100%;\n height: 15vh;\n max-height: #{15 * $aspect-ratio-hw}vw;\n position: absolute;\n bottom: 0;\n left: 0;\n overflow: visible;\n\n .screen-control {\n display: inline-block;\n width: 25%;\n height: 100%;\n text-align: center;\n color: $color-yellow;\n\n button {\n border: none;\n background-color: transparent;\n color: inherit;\n width: 1em;\n padding: 0;\n font-size: 400%;\n text-align: center;\n vertical-align: middle;\n cursor: pointer;\n\n &:after {\n display: block;\n font-family: 'Font Awesome 5 Free', sans-serif;\n font-weight: 900;\n }\n\n &:focus {\n outline: none;\n }\n }\n\n .left {\n &:after {\n content: \"\"; // fa-caret-left\n }\n }\n\n .right {\n &:after {\n content: \"\"; // fa-caret-right\n }\n }\n\n .action {\n font-size: 250%;\n\n &:after {\n content: \"\"; // fa-circle\n }\n }\n }\n\n &.with-1-controls {\n .screen-control {\n width: 100%;\n }\n }\n\n &.with-2-controls {\n .screen-control {\n width: 50%;\n }\n }\n\n &.with-3-controls {\n .screen-control {\n width: 33.33%;\n }\n }\n\n &.with-4-controls {\n .screen-control {\n width: 25%;\n }\n }\n\n @mixin control-color($color, $color-lit) {\n color: $color;\n button.active {\n color: $color-lit;\n text-shadow: 0 0 1ex $color;\n }\n }\n\n .screen-control-0 {\n @include control-color($color-blue, $color-blue-lit);\n }\n\n .screen-control-1 {\n @include control-color($color-red, $color-red-lit);\n }\n\n .screen-control-2 {\n @include control-color($color-green, $color-green-lit);\n }\n\n .screen-control-3 {\n @include control-color($color-orange, $color-orange-lit);\n }\n}\n\n\n",".debug-pane {\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\n color: $color-yellow;\n opacity: 0.6;\n font-size: 1ex;\n pointer-events: none;\n}\n\n.debug-pane-controls {\n position: absolute;\n}\n\n@media (min-aspect-ratio: #{$width} / #{$height}), (aspect-ratio: #{$width} / #{$height}) {\n .debug-pane-controls {\n position: absolute;\n bottom: 1vh;\n left: 1vh;\n }\n}\n\n@media (max-aspect-ratio: #{$width} / #{$height}) {\n .debug-pane-controls {\n position: absolute;\n bottom: #{$aspect-ratio-hw}vh;\n left: #{$aspect-ratio-hw}vh;\n }\n}\n\n",".text {\n text-transform: uppercase;\n}\n\n.text-center {\n width: 100%;\n text-align: center;\n}\n\n\n@keyframes blinking{\n 0% {\topacity: 1;\t}\n 49% {\topacity: 1;\t}\n 75% {\topacity: 0;\t}\n 99% {\topacity: 0;\t}\n 100% {\topacity: 1;\t}\n}\n\n.blinking {\n animation: blinking 1.25s infinite;\n}\n",".main {\n @include regularText;\n width: 100%;\n height: 100%;\n\n .min-aspect-ratio {\n position: relative;\n width: 100%;\n height: 100%;\n max-width: #{$aspect-ratio-wh * 100}vh;\n margin: auto;\n background-color: $color-bg;\n overflow: hidden;\n font-size: 100%;\n\n .game-view, .overlay {\n position: absolute;\n top: 0px;\n height: #{$aspect-ratio-hw * 80}vw;\n max-height: 80vh;\n width: 100%;\n }\n\n .game-view {\n & > svg {\n display: inline-block;\n width: 100%;\n height: 100%;\n }\n }\n\n .overlay {\n background-color: transparent;\n pointer-events: none;\n }\n }\n}\n\n.title-logo {\n @include lightText;\n text-transform: uppercase;\n font-size: 40px;\n}\n\n.title-press-to-start {\n @extend .blinking;\n @extend .text;\n @extend .text-center;\n position: absolute;\n top: 80%;\n color: $color-turquoise;\n}\n\n.menu-title {\n margin-top: 15%;\n}\n\n.menu-selector {\n text-align: center;\n margin-top: 10%;\n\n .item {\n position: relative;\n display: inline-block;\n margin: 0 5%;\n padding-top: 0.16ex;\n padding-bottom: 0.16ex;\n box-sizing: content-box;\n\n &.selected {\n border-color: $color-yellow;\n border-bottom: 0.09ex solid;\n border-top: 0.09ex solid;\n }\n }\n}\n\n.menu-tip {\n max-width: 75%;\n margin: 6% auto 0;\n line-height: 1;\n color: $color-yellow-dim;\n}\n","@mixin fs-gradient-vector-regular {\n font-family: 'gradient-vector', sans-serif;\n font-weight: 400;\n}\n\n@mixin fs-gradient-vector-light {\n font-family: 'gradient-vector', sans-serif;\n font-weight: 300;\n}\n",".play {\n color: lightgray;\n stroke-width: 3;\n stroke: none;\n fill: none;\n}\n\n$player-colors: $color-player-0, $color-player-1, $color-player-2, $color-player-3;\n\n@mixin player($color) {\n $player-color: $color;\n\n color: $player-color;\n\n .draw &, &.draw {\n stroke: $player-color;\n }\n\n .fill &, &.fill {\n fill: $player-color;\n }\n}\n\n@for $i from 0 through 3 {\n .player-#{$i} {\n @include player(nth($player-colors, 1 + $i));\n }\n}\n\n.player-bot {\n @include player($color-player-bot);\n}\n\n.cover {\n stroke: none;\n fill: $color-bg;\n}\n\n.water {\n stroke: $color-water;\n}\n\n.ground {\n stroke: $color-ground;\n fill: $color-bg;\n}\n\n.ground-cover {\n @extend .cover;\n}\n\n.treasure {\n stroke: $color-treasure;\n}\n\n.overlay {\n .announcement-sequences-text {\n text-align: center;\n text-transform: uppercase;\n padding-bottom: 0.25ex;\n\n .line {\n margin-bottom: 0.4ex;\n }\n }\n\n .announcement-sequences-text-anchor {\n position: absolute;\n }\n\n .game-stats {\n position: relative;\n text-align: right;\n margin: 1ex 8ex 1ex 8ex;\n\n .remaining-time {\n position: absolute;\n right: 0;\n }\n\n .remaining-probes {\n position: absolute;\n left: 0;\n }\n\n * .counter {\n margin-left: 1ex;\n }\n }\n\n @keyframes slideOut {\n 0% {\n transform: translateX(0);\n }\n\n 100% {\n transform: translateX(-100%);\n }\n }\n\n @keyframes slideIn {\n 0% {\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n\n .demo-explanation {\n position: absolute;\n text-align: center;\n text-transform: uppercase;\n line-height: 1;\n width: 75%;\n height: 8ex;\n padding: 0 12.5% 0.25ex 12.5%;\n\n .demo-explanation-page {\n transform: translateX(100%);\n width: 75%;\n position: absolute;\n top: 0;\n left: 0;\n padding: 0 12.5% 0.25ex 12.5%;\n background-color: rgb($color-black, 50%);\n\n &.active {\n animation: slideIn 1s linear;\n transform: translateX(0);\n }\n\n &.first {\n animation: none;\n }\n\n &.leave {\n animation: slideOut 1s linear;\n transform: translateX(-100%);\n }\n }\n .line {\n margin-bottom: 0.4ex;\n }\n }\n}\n",".language-button {\n position: absolute;\n top: 0;\n left: 0;\n margin: 1ex 1ex 1ex 1ex;\n padding: 0ex 2ex 2ex 0ex;\n color: $color-yellow;\n opacity: 0.6;\n\n &:hover {\n opacity: 0.8;\n }\n\n &:active {\n opacity: 1.0;\n }\n\n & * {\n margin-top: -0.1ex;\n font-size: 188%;\n }\n}\n",".fullscreen-button {\n position: absolute;\n top: 0;\n right: 0;\n margin: 1ex 1ex 1ex 1ex;\n padding: 0ex 0ex 2ex 2ex;\n color: $color-yellow;\n opacity: 0.6;\n\n &:hover {\n opacity: 0.8;\n }\n\n &:active {\n opacity: 1.0;\n }\n\n & * {\n margin-top: -0.1ex;\n font-size: 188%;\n }\n}\n"]} \ No newline at end of file diff --git a/assets/css/default-68545de719.css.map b/assets/css/default-68545de719.css.map deleted file mode 100644 index e152e71..0000000 --- a/assets/css/default-68545de719.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["_warning.scss","_util.scss","_util_exhibits.scss","_base.scss","_colors.scss","_mod_controls.scss","_mod_debug.scss","_mod_text.scss","_mod_app.scss","_fonts.scss","_mod_play.scss","_mod_language.scss","_mod_fullscreen.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;ACmCA;AAEA;AAAA;EAEI;EACA;;;AAEJ;EACI;;;AAEJ;AACA;EACI;;;AClDJ;EACE;EACA;EACA;EACA;;;ACGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE,OCba;EDcb,kBCpBiB;;;ADuBnB;EACE;IACE;;;AAIJ;EACE;IACE;;;AE/BJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA,ODRW;;ACUX;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;AAIJ;EACE;;AAEA;EACE;;AAMJ;EACE;;AAKF;EACE;;AAKF;EACE;;AAKF;EACE;;AAYJ;EAPE,OD3ES;;AC4ET;EACE,ODvEW;ECwEX;;AAQJ;EAXE,OD1EQ;;AC2ER;EACE,ODtEU;ECuEV;;AAYJ;EAfE,ODzEU;;AC0EV;EACE,ODrEY;ECsEZ;;AAgBJ;EAnBE,ODxEW;;ACyEX;EACE,ODpEa;ECqEb;;;ACvFN;EACE;EACA,OFIa;EEHb;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;IACA;IACA;;;AAIJ;EACE;IACE;IACA;IACA;;;ACxBJ;EACE;;;AAGF;EACE;EACA;;;AAIF;EACE;IAAQ;;EACR;IAAQ;;EACR;IAAQ;;EACR;IAAQ;;EACR;IAAQ;;;AAGV;EACE;;;ACnBF;ECCE;EACA;EDAA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA,kBJRU;EISV;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAIA;EACE;EACA;EACA;;AAIJ;EACE;EACA;;;AAKN;EChCE;EACA;EDiCA;EACA;;;AAGF;EAIE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE,cJ/DS;EIgET;EACA;;;AAKN;EACE;EACA;EACA;EACA,OJzEiB;;;AMPnB;EACE;EACA;EACA;EACA;;;AAoBA;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AADlB;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AADlB;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AADlB;EAZA,OAakB;;AAXlB;EACE,QAUgB;;AAPlB;EACE,MAMgB;;;AAIpB;EAjBE,ONNa;;AMQb;EACE,QNTW;;AMYb;EACE,MNbW;;;AM2Bf;EACE;EACA,MNhCY;;;AMmCd;EACE,QNjBY;;;AMoBd;EACE,QNpBa;EMqBb,MNzCY;;;AMgDd;EACE,QN5Be;;;AMgCf;EACE;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAIJ;EACE;IACE;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAGF;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGJ;EACE;;;AC/IN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;;ACnBJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA","file":"default-68545de719.css","sourcesContent":["/*************************************************/\n/* This file was automatically generated by sass */\n/* Don't edit it directly */\n/*************************************************/","@mixin image-replace {\n display: block;\n text-align: left;\n text-indent: -100em;\n white-space: nowrap;\n overflow: hidden;\n background-repeat: no-repeat;\n}\n\n@mixin image-replace-src($image, $width, $height) {\n background-image: url($image);\n width: $width;\n height: $height;\n}\n\n@mixin opacity($opacity) {\n filter: unquote(\"progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})\");\n opacity: $opacity;\n}\n\n@mixin unselectable {\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n\n@mixin clearfix {\n &:before, &:after {\n content: \"\";\n display: table;\n }\n &:after {\n clear: both;\n }\n}\n\n/* Clearfix */\n\n.clearfix:before,\n.clearfix:after {\n content: \" \";\n display: table;\n}\n.clearfix:after {\n clear: both;\n}\n/* For IE 6/7 only */\n.clearfix {\n *zoom: 1;\n}\n","body.lock-position {\n height: 100%;\n overflow: hidden;\n width: 100%;\n position: fixed; // Needed to avoid scroll in iOS\n}","@use \"sass:math\";\n\n$width: 1920;\n$height: 1080;\n$aspect-ratio-wh: math.div($width, $height);\n$aspect-ratio-hw: math.div($height, $width);\n\n:root {\n color-scheme: light dark;\n}\n\nhtml, body {\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n}\n\nbody {\n color: $color-yellow;\n background-color: $color-black-real;\n}\n\n@media (min-aspect-ratio: #{$width} / #{$height}), (aspect-ratio: #{$width} / #{$height}) {\n body {\n font-size: 4vh;\n }\n}\n\n@media (max-aspect-ratio: #{$width} / #{$height}) {\n body {\n font-size: #{4 * $aspect-ratio-hw}vw;\n }\n}\n","$color-black-real: #000;\n$color-white-real: #fff;\n\n$color-black: #151515;\n$color-white: $color-white-real;\n\n$color-yellow: #ffec02;\n$color-yellow-dim: #8b811e;\n$color-turquoise: #33c6ff;\n$color-blue: #2197ff;\n$color-red: #ff2d2d;\n$color-green: #29da29;\n$color-orange: #FF8D18;\n\n$color-yellow-lit: #fffbcd;\n$color-blue-lit: #c2e2ff;\n$color-red-lit: #ffcaca;\n$color-green-lit: #b4ffb4;\n$color-orange-lit: #fad0a5;\n\n$color-bg: $color-black;\n\n$color-water: #9999ff;\n$color-ground: #ffe699;\n$color-treasure: #F99C2D;\n\n$color-player-0: $color-blue;\n$color-player-1: $color-red;\n$color-player-2: $color-green;\n$color-player-3: $color-orange;\n$color-player-bot: $color-yellow;\n\n@mixin neg {\n -webkit-font-smoothing: antialiased;\n}\n",".screen-controls {\n width: 100%;\n height: 15vh;\n max-height: #{15 * $aspect-ratio-hw}vw;\n position: absolute;\n bottom: 0;\n left: 0;\n overflow: visible;\n\n .screen-control {\n display: inline-block;\n width: 25%;\n height: 100%;\n text-align: center;\n color: $color-yellow;\n\n button {\n border: none;\n background-color: transparent;\n color: inherit;\n width: 1em;\n padding: 0;\n font-size: 400%;\n text-align: center;\n vertical-align: middle;\n cursor: pointer;\n\n &:after {\n display: block;\n font-family: 'Font Awesome 5 Free', sans-serif;\n font-weight: 900;\n }\n\n &:focus {\n outline: none;\n }\n }\n\n .left {\n &:after {\n content: \"\"; // fa-caret-left\n }\n }\n\n .right {\n &:after {\n content: \"\"; // fa-caret-right\n }\n }\n\n .action {\n font-size: 250%;\n\n &:after {\n content: \"\"; // fa-circle\n }\n }\n }\n\n &.with-1-controls {\n .screen-control {\n width: 100%;\n }\n }\n\n &.with-2-controls {\n .screen-control {\n width: 50%;\n }\n }\n\n &.with-3-controls {\n .screen-control {\n width: 33.33%;\n }\n }\n\n &.with-4-controls {\n .screen-control {\n width: 25%;\n }\n }\n\n @mixin control-color($color, $color-lit) {\n color: $color;\n button.active {\n color: $color-lit;\n text-shadow: 0 0 1ex $color;\n }\n }\n\n .screen-control-0 {\n @include control-color($color-blue, $color-blue-lit);\n }\n\n .screen-control-1 {\n @include control-color($color-red, $color-red-lit);\n }\n\n .screen-control-2 {\n @include control-color($color-green, $color-green-lit);\n }\n\n .screen-control-3 {\n @include control-color($color-orange, $color-orange-lit);\n }\n}\n\n\n",".debug-pane {\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\n color: $color-yellow;\n opacity: 0.6;\n font-size: 1ex;\n pointer-events: none;\n}\n\n.debug-pane-controls {\n position: absolute;\n}\n\n@media (min-aspect-ratio: #{$width} / #{$height}), (aspect-ratio: #{$width} / #{$height}) {\n .debug-pane-controls {\n position: absolute;\n bottom: 1vh;\n left: 1vh;\n }\n}\n\n@media (max-aspect-ratio: #{$width} / #{$height}) {\n .debug-pane-controls {\n position: absolute;\n bottom: #{$aspect-ratio-hw}vh;\n left: #{$aspect-ratio-hw}vh;\n }\n}\n\n",".text {\n text-transform: uppercase;\n}\n\n.text-center {\n width: 100%;\n text-align: center;\n}\n\n\n@keyframes blinking{\n 0% {\topacity: 1;\t}\n 49% {\topacity: 1;\t}\n 75% {\topacity: 0;\t}\n 99% {\topacity: 0;\t}\n 100% {\topacity: 1;\t}\n}\n\n.blinking {\n animation: blinking 1.25s infinite;\n}\n",".main {\n @include regularText;\n width: 100%;\n height: 100%;\n\n .min-aspect-ratio {\n position: relative;\n width: 100%;\n height: 100%;\n max-width: #{$aspect-ratio-wh * 100}vh;\n margin: auto;\n background-color: $color-bg;\n overflow: hidden;\n font-size: 100%;\n\n .game-view, .overlay {\n position: absolute;\n top: 0px;\n height: #{$aspect-ratio-hw * 80}vw;\n max-height: 80vh;\n width: 100%;\n }\n\n .game-view {\n & > svg {\n display: inline-block;\n width: 100%;\n height: 100%;\n }\n }\n\n .overlay {\n background-color: transparent;\n pointer-events: none;\n }\n }\n}\n\n.title-logo {\n @include lightText;\n text-transform: uppercase;\n font-size: 40px;\n}\n\n.title-press-to-start {\n @extend .blinking;\n @extend .text;\n @extend .text-center;\n position: absolute;\n top: 80%;\n}\n\n.menu-title {\n margin-top: 15%;\n}\n\n.menu-selector {\n text-align: center;\n margin-top: 10%;\n\n .item {\n position: relative;\n display: inline-block;\n margin: 0 5%;\n padding-top: 0.16ex;\n padding-bottom: 0.16ex;\n box-sizing: content-box;\n\n &.selected {\n border-color: $color-yellow;\n border-bottom: 0.09ex solid;\n border-top: 0.09ex solid;\n }\n }\n}\n\n.menu-tip {\n max-width: 75%;\n margin: 6% auto 0;\n line-height: 1;\n color: $color-yellow-dim;\n}\n","@mixin fs-gradient-vector-regular {\n font-family: 'gradient-vector', sans-serif;\n font-weight: 400;\n}\n\n@mixin fs-gradient-vector-light {\n font-family: 'gradient-vector', sans-serif;\n font-weight: 300;\n}\n",".play {\n color: lightgray;\n stroke-width: 3;\n stroke: none;\n fill: none;\n}\n\n$player-colors: $color-player-0, $color-player-1, $color-player-2, $color-player-3;\n\n@mixin player($color) {\n $player-color: $color;\n\n color: $player-color;\n\n .draw &, &.draw {\n stroke: $player-color;\n }\n\n .fill &, &.fill {\n fill: $player-color;\n }\n}\n\n@for $i from 0 through 3 {\n .player-#{$i} {\n @include player(nth($player-colors, 1 + $i));\n }\n}\n\n.player-bot {\n @include player($color-player-bot);\n}\n\n.cover {\n stroke: none;\n fill: $color-bg;\n}\n\n.water {\n stroke: $color-water;\n}\n\n.ground {\n stroke: $color-ground;\n fill: $color-bg;\n}\n\n.ground-cover {\n @extend .cover;\n}\n\n.treasure {\n stroke: $color-treasure;\n}\n\n.overlay {\n .announcement-sequences-text {\n text-align: center;\n text-transform: uppercase;\n padding-bottom: 0.25ex;\n\n .line {\n margin-bottom: 0.4ex;\n }\n }\n\n .announcement-sequences-text-anchor {\n position: absolute;\n }\n\n .game-stats {\n position: relative;\n text-align: right;\n margin: 1ex 8ex 1ex 8ex;\n\n .remaining-time {\n position: absolute;\n right: 0;\n }\n\n .remaining-probes {\n position: absolute;\n left: 0;\n }\n\n * .counter {\n margin-left: 1ex;\n }\n }\n\n @keyframes slideOut {\n 0% {\n transform: translateX(0);\n }\n\n 100% {\n transform: translateX(-100%);\n }\n }\n\n @keyframes slideIn {\n 0% {\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n\n .demo-explanation {\n position: absolute;\n text-align: center;\n text-transform: uppercase;\n line-height: 1;\n width: 75%;\n height: 8ex;\n padding: 0 12.5% 0.25ex 12.5%;\n\n .demo-explanation-page {\n transform: translateX(100%);\n width: 75%;\n position: absolute;\n top: 0;\n left: 0;\n padding: 0 12.5% 0.25ex 12.5%;\n background-color: rgb($color-black, 50%);\n\n &.active {\n animation: slideIn 1s linear;\n transform: translateX(0);\n }\n\n &.first {\n animation: none;\n }\n\n &.leave {\n animation: slideOut 1s linear;\n transform: translateX(-100%);\n }\n }\n .line {\n margin-bottom: 0.4ex;\n }\n }\n}\n",".language-button {\n position: absolute;\n top: 0;\n left: 0;\n margin: 1ex 1ex 1ex 1ex;\n padding: 0ex 2ex 2ex 0ex;\n color: $color-yellow;\n opacity: 0.6;\n\n &:hover {\n opacity: 0.8;\n }\n\n &:active {\n opacity: 1.0;\n }\n\n & * {\n margin-top: -0.1ex;\n font-size: 188%;\n }\n}\n",".fullscreen-button {\n position: absolute;\n top: 0;\n right: 0;\n margin: 1ex 1ex 1ex 1ex;\n padding: 0ex 0ex 2ex 2ex;\n color: $color-yellow;\n opacity: 0.6;\n\n &:hover {\n opacity: 0.8;\n }\n\n &:active {\n opacity: 1.0;\n }\n\n & * {\n margin-top: -0.1ex;\n font-size: 188%;\n }\n}\n"]} \ No newline at end of file diff --git a/assets/js/bundle-0dc89b22da.min.js b/assets/js/bundle-0dc89b22da.min.js new file mode 100644 index 0000000..75d7b14 --- /dev/null +++ b/assets/js/bundle-0dc89b22da.min.js @@ -0,0 +1,2 @@ +!function r(o,i,a){function u(t,e){if(!i[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(s)return s(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},o[t][0].call(n.exports,function(e){return u(o[t][1][e]||e)},n,n.exports,r,o,i,a)}return i[t].exports}for(var s="function"==typeof require&&require,e=0;ee.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.treasureWidth}).reduce(function(e,t){return t.right.x-t.left.x>e.right.x-e.left.x?t:e})}}])&&i(e.prototype,t),n&&i(e,n),r}();n.default=a},{"../debug-console":9}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("./base")),a=r(e("../debug-console"));function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;ne.value?t:e},0),e=t.filter(function(e){return e.value>=r&&!n.locations.has(e.x)}),e=e.reduce(function(e,t){return e.value>t.value?e:t});return this.locations.add(e.x),this.gda=null,this.getNextProbeLocationLocal(e)}catch(e){this.gda=null;var o=this.findLargestUnknownTerritory(t);return(o.left.x+o.right.x)/2}}}]),o}();n.default=e;var h=function(){function e(){u(this,e),this.lastArmijoTangent=null,this.alpha=d}return c(e,[{key:"step",value:function(e){if(this.lastArmijoTangent||(this.lastArmijoTangent=e,this.alpha=d),e.value>this.lastArmijoTangent.value+.5*this.alpha*Math.abs(this.lastArmijoTangent.slope))return this.lastArmijoTangent=e,this.alpha=d,this.step(e);var t=this.lastArmijoTangent.x+this.alpha*this.lastArmijoTangent.slope;return a.default.log("alpha",this.alpha,"t",e,"x",t),this.alpha*=.5,t}}]),e}()},{"../debug-console":9,"./base":1}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e("./base"))&&r.__esModule?r:{default:r};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n=u.treasureWidth}).map(function(e){return o=e.left,i=e.right,a=u.treasureWidth/2,t=function(e,t){var n={x:e.x,y:e.value},r={x:1,y:e.slope},o={x:t.x,y:t.value},i={x:-1,y:-t.slope},r={start:n,end:f(n,r)},i={start:o,end:f(o,i)},i=function(e,t){var n=e.end.x-e.start.x,r=e.end.y-e.start.y,o=t.end.x-t.start.x,i=t.end.y-t.start.y,a=i*n-o*r;if(0==a)return null;var u=e.start.x-t.start.x,t=e.start.y-t.start.y,a=(o*t-i*u)/a;return{x:e.start.x+a*n,y:e.start.y+a*r}}(r,i);return null!==i&&e.xt.weight?e:t}),r=o.x+a,e=i.x-a,n.x=Math.max(r,Math.min(n.x,e)),n;var o,i,a,t,n,r}).reduce(function(e,t){return e.weight>t.weight?e:t}).x}}])&&a(e.prototype,t),n&&a(e,n),o}();function f(e,t){return{x:e.x+t.x,y:e.y+t.y}}n.default=l},{"./base":1}],5:[function(e,t,n){"use strict";function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.options.duration)return this.demoOver(),void this.triggerEvent("timeout");var i=Math.floor(this.elapsedTime/this.options.duration*3);i!==this.currPage&&this.setPage(i),e=e.slice(0,o),n=n.slice(0,o),null!==this.bot&&(o=(i=a.default.buildBotInput(this.bot)).input,i=i.lastInput,e.push(o),n.push(i)),this.processInputs(e,n,t,r)}},{key:"gameOver",value:(n=c(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"demoOver",value:(t=c(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.players.map(function(e){return e.probingDone()}));case 2:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"showGameStartSequence",value:(e=c(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"showDemoText",value:function(){var e=33800/this.game.draw.height();this.$demoExplanationContainer=$("
").addClass("demo-explanation").css("top","".concat(e,"%")).appendTo(this.$overlay),this.$demoExplanationPages=[];for(var t=0;t<3;t+=1){var n=$("
").addClass("demo-explanation-page").appendTo(this.$demoExplanationContainer);0===t&&n.addClass(["active","first"]),this.$demoExplanationPages.push(n);for(var r=0;r<2;r+=1){var o=$("
").addClass("line").appendTo(n);(0,u.localeInit)(o,"demo-explanation",t,r)}}this.$pressToStart=$("
").addClass("title-press-to-start").appendTo(this.$overlay),(0,u.localeInit)(this.$pressToStart,"press-to-start")}},{key:"setPage",value:function(n){this.currPage=n,this.$demoExplanationPages.forEach(function(e,t){t===n?e.addClass("active"):e.hasClass("active")&&(e.removeClass("active"),e.addClass("leave"))})}}]),i}();(n.default=b).defaultOptions={duration:18e3}},{"./game-mode-play":15,"./i18n":19}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,u=(r=e("./game-mode"))&&r.__esModule?r:{default:r},c=e("./i18n");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n').appendTo(t),c.localeInit.apply(void 0,[o].concat(l(this.getMenuTitleKeys()))),i=$('