Skip to content

Commit

Permalink
Working playtest! Probably!
Browse files Browse the repository at this point in the history
  • Loading branch information
AhoyLemon committed Jan 1, 2021
1 parent 4383b79 commit db27389
Show file tree
Hide file tree
Showing 26 changed files with 87 additions and 58 deletions.
Binary file removed audio/0dln84.mp3
Binary file not shown.
Binary file removed audio/3ge4hh-2.mp3
Binary file not shown.
Binary file removed audio/3ge4hh.mp3
Binary file not shown.
Binary file removed audio/correct.mp3
Binary file not shown.
Binary file removed audio/no.mp3
Binary file not shown.
Binary file removed audio/odqid3.mp3
Binary file not shown.
Binary file removed audio/password_cracked.mp3
Binary file not shown.
Binary file removed audio/pi392f.mp3
Binary file not shown.
Binary file removed audio/too_slow.mp3
Binary file not shown.
Binary file removed audio/unngxf.mp3
Binary file not shown.
Binary file removed audio/you_idiot.mp3
Binary file not shown.
1 change: 0 additions & 1 deletion game.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ io.on('connection', (socket) => {
io.in(msg.roomCode).emit("startNewRound", {
playerIndex: msg.playerIndex,
players: msg.players,
allPlayedRounds: msg.allPlayedRounds,
summary: msg.summary
});
});
Expand Down
38 changes: 20 additions & 18 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@11:53:10">
<meta http-equiv="last-modified" content="2021-00-01@13:17:32">
</head>
<body>
<div id="app" v-cloak>
Expand Down Expand Up @@ -75,7 +75,7 @@ <h1>Welcome to BigCorp</h1>
</div>
</div>
</div>
<div class="admin-screen" v-if="my.role == 'SysAdmin' &amp;&amp; (round.phase == 'choose rules' || round.phase == 'create password' || round.phase == 'crashed')">
<div class="admin-screen" v-if="my.role == 'SysAdmin' &amp;&amp; (round.phase == 'choose rules' || round.phase == 'add bugs' || round.phase == 'create password' || round.phase == 'crashed')">
<div class="top-info">
<div class="name">{{my.name}}</div>
<div class="job">SysAdmin</div>
Expand Down Expand Up @@ -436,7 +436,7 @@ <h2 class="success">Success!</h2>
<div class="round-reminder" :class="{'visible': (round.hurryTime &lt;= 10)}">
<h3>Played rounds...</h3>
<ol>
<li v-for="round in allPlayedRounds">{{round}}</li>
<li v-for="round in roundSummary">{{round.challenge}}</li>
</ol>
</div>
<div class="timer final-timer" v-if="round.roundTimer != undefined">
Expand All @@ -457,20 +457,22 @@ <h3>Played rounds...</h3>
<main class="game-over" v-if="round.phase == 'GAME OVER'">
<h1>Game Over!</h1>
<section class="round-summaries">
<div class="round-summary" v-for="(r, index) in roundSummary">
<div class="number">{{(index + 1)}}</div>
<div class="sysadmin">{{r.sysAdmin}} presented...</div>
<div class="challenge">{{r.challenge}}</div>
<ul class="rules">
<li class="rule" v-for="m in r.rules">{{m.message}}</li>
<li class="rule" v-if="!r.rules || r.rules.length &lt; 1">{{r.sysAdmin}} didn't set any rules.</li>
<li class="bug" v-for="b in r.bugs"> <strong>{{b}} </strong> was a bug</li>
<li class="bug" v-if="!r.bugs || r.bugs.length &lt; 1">{{r.sysAdmin}} didn't create any bugs.</li>
</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>
</ol>
<div class="summaries">
<div class="round-summary" v-for="(r, index) in roundSummary">
<div class="number">{{(index + 1)}}</div>
<div class="sysadmin">{{r.sysAdmin}} presented...</div>
<div class="challenge">{{r.challenge}}</div>
<ul class="rules">
<li class="rule" v-for="m in r.rules">{{m.message}}</li>
<li class="rule" v-if="!r.rules || r.rules.length &lt; 1">{{r.sysAdmin}} didn't set any rules.</li>
<li class="bug" v-for="b in r.bugs"> <strong>{{b}} </strong> was a bug</li>
<li class="bug" v-if="!r.bugs || r.bugs.length &lt; 1">{{r.sysAdmin}} didn't create any bugs.</li>
</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>
</ol>
</div>
</div>
</div>
</section>
Expand Down Expand Up @@ -553,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@11:53:10"></script>
<script src="js/min/site.min.js?updated2021-00-01@13:17:32"></script>
</div>
</body>
</html>
36 changes: 31 additions & 5 deletions js/partials/_challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ const challenges = [
{
id: 20,
name: "Simpsons Characters",
nameAsRule: "Your password must be the first name of a recurring Simpsons character.",
nameAsRule: "Your password must be the first name of a recurring Simpsons character who DOESN'T have the last name of Simpson",
hint: "Fat Tony's first name isn't Tony.",
failedMessage: "[PASS] is not a Simpsons character. Or is. It's 32+ seasons.",
possible: [
Expand All @@ -1041,34 +1041,60 @@ const challenges = [
"ARTIE",
"BARNEY",
"BARRY", // <-- DUFFMAN
"BOB",
"BRANDINE",
"CARL",
"CHARLES", // <-- MONTY BURNS
"CLANCY",
"JEFF", // <- COMIC BOOK GUY
"COOKIE",
"BOB",
"DATABASE",
"DEWEY",
"DORIS", // <-- LUNCHLADY DORIS
"DREDERICK",
"EDDIE",
"EDNA",
"ELIZABETH", // <-- MISS HOOVER
"FRANKIE", // FRANKIE THE SQUEALER
"FRANKIE", // <-- FRANKIE THE SQUEALER
"GARY", // <-- SUPERNINTENDO CHALMERS
"GIL",
"HANS",
"HELEN",
"JIMBO",
"JOHNNY",
"JOE", // <-- DIAMOND JOE QUIMBY
"JOHNNY", // <-- JOHNNY TIGHTLIPS
"JOHN", // <-- PROFESSOR FRINK
"JULIUS",
"KEARNEY",
"KENT",
"KIRK",
"KRUSTY",
"LENNY",
"LINDSEY",
"LIONEL",
"LOU",
"LUANN",
"LUIGI",
"MEL",
"MILHOUSE",
"MANJULA",
"MARION", // <-- THERE'S FAT TONY!
"MARVIN", // <-- MARVIN MONROE
"MARTIN",
"MOE",
"MURPHY", // <- BLEEDING GUMS MURPHY
"NED",
"NICK", // <-- DR. NICK
"OTTO",
"PATTY",
"RAINIER",
"RALPH",
"ROD",
"TODD",
"TROY",
"SELMA",
"SEYMOUR",
"STU", // <- DISCO STU
"WAYLON", // <-- SMITHERS
"WILLIE"
],
source: "https://en.wikipedia.org/wiki/List_of_recurring_The_Simpsons_characters"
Expand Down
1 change: 0 additions & 1 deletion js/partials/_sockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ socket.on("startNewRound", function(msg) {
console.log("new round started.");

app.players = msg.players;
app.allPlayedRounds = msg.allPlayedRounds;
app.roundSummary.push(msg.summary);

// Hey, what round is it? Is it time for the final round?
Expand Down
4 changes: 4 additions & 0 deletions js/partials/_sounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ const soundYouIdiot = new Howl({

const soundTooSlow = new Howl({
src: [ audioSrc + 'too_slow.mp3' ]
});

const soundGameOver = new Howl({
src: [ audioSrc + 'you_made_it_to_the_end_of_the_game.mp3' ]
});
17 changes: 7 additions & 10 deletions js/partials/_vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var app = new Vue({
}
},
allEmployeePasswords: [],
allPlayedRounds: [],
//allPlayedRounds: [],
roundSummary: [],
crackSummary: [],
ui: {
Expand Down Expand Up @@ -820,12 +820,12 @@ var app = new Vue({

startNextRoundClicked() {
const self = this;
self.allPlayedRounds.push(self.round.challenge.name);

var summary = {
challenge: self.round.challenge.name,
sysAdmin: self.my.name,
rules: self.round.rules,
bugs: self.round.bugs,
attempts: self.round.attempts,
};

Expand Down Expand Up @@ -919,15 +919,10 @@ var app = new Vue({
const self = this;
clearInterval(self.round.roundTimer);
self.round.roundTimer = undefined;

// TODO: Create a game over screen.
alert('IMAGINE A GAME OVER SCREEN GOES HERE.');
self.phase.round = "GAME OVER";
soundGameOver.play();
},

sortArrayBy(arr,key) {

}

},

computed: {
Expand Down Expand Up @@ -1063,7 +1058,8 @@ var app = new Vue({
/////////////////////////////////////////////
// FAKE A GAME OVER SCREEN.



/*
self.my.role = "employee";
self.my.name = "Lemon";
self.my.playerIndex = 0;
Expand Down Expand Up @@ -1207,6 +1203,7 @@ var app = new Vue({
{ pw: "DIPPER", attackerIndex: 3, victimIndex: 1 },
{ pw: "SOMALI", attackerIndex: 2, victimIndex: 3 },
];
*/



Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion public/css/site.css

Large diffs are not rendered by default.

Loading

0 comments on commit db27389

Please sign in to comment.