Skip to content

Commit

Permalink
Game over works!
Browse files Browse the repository at this point in the history
Also, this closes #36
This closes #34
  • Loading branch information
AhoyLemon committed Jan 1, 2021
1 parent 105fa7d commit 4de6cbe
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link href="css/site.css" type="text/css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta http-equiv="last-modified" content="2021-00-01@13:17:32">
<meta http-equiv="last-modified" content="2021-00-01@13:46:54">
</head>
<body>
<div id="app" v-cloak>
Expand Down Expand Up @@ -232,16 +232,16 @@ <h2>Add a Password Rule</h2>
</form>
</div>
<div class="panel bug-setup" v-if="round.phase == 'add bugs'">
<div class="first-bug-intro" v-if="!round.bugs">
<div class="first-bug-intro" v-if="!round.bugs || round.bugs.length &lt; 1">
<h2>Add a bug to the system.</h2>
<p>Enter a word to use as a bug.</p>
<p>If a player tries to use that word as a password, the system will crash (and you earn points.)</p>
<p v-if="my.rulebux &lt; 1">FYI, next time you're SysAdmin, you can buy additional bugs for 1<sup>ƒ</sup>.</p>
<p v-if="(!round.bugs || round.bugs.length &lt; 1 ) &amp;&amp; my.rulebux &lt; 1">FYI, next time you're SysAdmin, you can buy additional bugs for 1<sup>ƒ</sup>.</p>
</div>
<div class="additional-bug" v-else-if="my.rulebux &gt; 0">
<p>You may add {{my.rulebux}} additional bugs to the system</p>
</div>
<form class="fieldset-and-button" v-on:submit.prevent="addBug()" v-if="!round.bugs || my.rulebux &gt; 0">
<form class="fieldset-and-button" v-on:submit.prevent="addBug()" v-if="!round.bugs || round.bugs.length &lt; 1 || my.rulebux &gt; 0">
<fieldset>
<label for="BugPassword">Set a Bug on </label>
<input type="text" id="BugPassword" v-model="ui.addBug" v-touppercase v-focus placeholder="PASSWORD">
Expand Down Expand Up @@ -470,7 +470,7 @@ <h1>Game Over!</h1>
</ul>
<div class="attempts">
<ol>
<li v-for="a in r.attempts" :class="a.result">{{players[a.playerIndex].name}} tried <strong>{{a.pwAttempt}}</strong><span v-if="a.result == 'crash'">, and that crashed the server.</span></li>
<li v-for="a in r.attempts" :class="a.result">{{players[a.playerIndex].name}} tried <strong>{{a.pwAttempt}}</strong><span v-if="a.result == 'crash'">, which crashed the server.</span></li>
</ol>
</div>
</div>
Expand Down Expand Up @@ -555,7 +555,7 @@ <h3>This game is <span>by Lemon.</span></h3><img src="svg/lemon.svg" alt="Lemon"
var socket = io.connect();

</script>
<script src="js/min/site.min.js?updated2021-00-01@13:17:32"></script>
<script src="js/min/site.min.js?updated2021-00-01@13:46:54"></script>
</div>
</body>
</html>
5 changes: 3 additions & 2 deletions js/partials/_variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const settings = {
forCrackingOwnPassword: -50
},
timer: {
countdownToFinal: 20,
finalRound: 600
countdownToFinal: 30,
finalRound: 60
}
};

Expand Down Expand Up @@ -93,6 +93,7 @@ function resetUI() {
app.ui.addBug = "";
app.ui.addBugErrors = [];
app.ui.passwordAttempt = null;
app.ui.passwordAttemptErrors = [];
app.ui.passwordInputError = false;
app.ui.passwordSucceeded = false;
app.ui.currentRule.editing = false;
Expand Down
2 changes: 1 addition & 1 deletion js/partials/_vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ var app = new Vue({
const self = this;
clearInterval(self.round.roundTimer);
self.round.roundTimer = undefined;
self.phase.round = "GAME OVER";
self.round.phase = "GAME OVER";
soundGameOver.play();
},

Expand Down
2 changes: 1 addition & 1 deletion public/css/site.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/site.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/min/site.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/min/site.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pug/partials/_admin.pug
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@
button(type="submit") Set

.panel.bug-setup(v-if="round.phase == 'add bugs'")
.first-bug-intro(v-if="!round.bugs")
.first-bug-intro(v-if="!round.bugs || round.bugs.length < 1")
h2 Add a bug to the system.
p Enter a word to use as a bug.
p If a player tries to use that word as a password, the system will crash (and you earn points.)
p(v-if="my.rulebux < 1") FYI, next time you're SysAdmin, you can buy additional bugs for 1
p(v-if="(!round.bugs || round.bugs.length < 1 ) && my.rulebux < 1") FYI, next time you're SysAdmin, you can buy additional bugs for 1
sup ƒ
| .
.additional-bug(v-else-if="my.rulebux > 0")
p You may add {{my.rulebux}} additional bugs to the system
form.fieldset-and-button(v-on:submit.prevent="addBug()" v-if="!round.bugs || my.rulebux > 0")
form.fieldset-and-button(v-on:submit.prevent="addBug()" v-if="!round.bugs || round.bugs.length < 1 || my.rulebux > 0")
fieldset
label(for="BugPassword") Set a Bug on
input(type="text" id="BugPassword" v-model="ui.addBug" v-touppercase v-focus placeholder="PASSWORD")
Expand Down
2 changes: 1 addition & 1 deletion pug/partials/_game-over.pug
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ main.game-over(v-if="round.phase == 'GAME OVER'")
ol
li(v-for="a in r.attempts" :class="a.result") {{players[a.playerIndex].name}} tried
strong {{a.pwAttempt}}
span(v-if="a.result == 'crash'") , and that crashed the server.
span(v-if="a.result == 'crash'") , which crashed the server.

h2 In the final round...

Expand Down
4 changes: 2 additions & 2 deletions scss/partials/_game-over.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

main.game-over { font-family: $serif; background:#e4e72c; min-height: 99.999vh;
main.game-over { font-family: $serif; background:#e4e72c; min-height: 99.999vh; padding-top:($gap * 2);

section { margin-bottom: ($gap * 4); }
section { margin-bottom: ($gap * 5); }
h1 { font-size:9vw; text-align: center; text-transform: uppercase; letter-spacing: 0.25em; margin:0; }
h2 { font-size:5.5vw; text-align: center; text-transform: uppercase; letter-spacing: 0.25em; margin:0; }

Expand Down

0 comments on commit 4de6cbe

Please sign in to comment.