-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
1,317 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# animalmatch | ||
|
||
Animal Match is a simple pair-matching memory game where the player turns over pairs of cards and tries to find matching animals. This game is implemented in pure JavaScript using localStorage for leaderboards, so can easily be cheated using the console or modifying web elements, but short of a server-client implementation this is unavoidable. It's still fun to play! | ||
|
||
|
||
|
||
|
||
There are four single-player gamemodes: | ||
- Classic (finding pairs of animals) | ||
- 3-match (still 12 unique animals, but now there are 3 of each) | ||
- 4-match (finding sets of 4 of each animal) | ||
- 6-match (you guessed it: 6 of each animal to find) | ||
|
||
Naturally, these get progressively harder. | ||
|
||
For single-player modes, highscores are stored in a leaderboard for each gamemode. Names are limited to exactly 3 characters long, reminiscent of old-school videogame leaderboards. | ||
|
||
On the menu page there is the option to align cards in a grid. This generally makes playing the game easier, so a star is left by the player's name on the leaderboard to indicate this assistance was used. | ||
|
||
There is one 2-player gamemode: | ||
- Competitive mode (play against a friend) | ||
|
||
When playing with two players, either the mouse or the appropriate keys on the keyboard can be used to turn over cards. | ||
The player who turns over a matching animal on their turn gets a point! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<title>Pair Matching Game</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
<script src="scripts.js"></script> | ||
<link rel="icon" type="image/x-icon" href="/assets/card.ico"> | ||
|
||
</head> | ||
<body onload="init()"> | ||
<h1 id="title">Animal Match</h1> | ||
<h2 id="subtitle">Turn over sets of cards and try to find all the matching animals!</h2> | ||
<p id="attempts"></p> | ||
<label for="leaderboardname" id="label-leaderboardname" class="hidden">Enter a name for the leaderboard (3 letters, save with Enter)</label> | ||
<input type="text" maxlength="3" id="leaderboardname" class="hidden"> | ||
<div id="leaderboard-div" hidden> | ||
<p id="easymodelabel">Easy mode</p> | ||
<table id="leaderboard"> | ||
<tr> | ||
<th>#</th> | ||
<th>Name</th> | ||
<th>Score</th> | ||
</tr> | ||
<tr class="gold"> | ||
<td>1</td><td id="name1"></td><td id="score1"></td> | ||
</tr> | ||
<tr class="silver"> | ||
<td>2</td><td id="name2"></td><td id="score2"></td> | ||
</tr> | ||
<tr class="bronze"> | ||
<td>3</td><td id="name3"></td><td id="score3"></td> | ||
</tr> | ||
<tr> | ||
<td>4</td><td id="name4"></td><td id="score4"></td> | ||
</tr> | ||
<tr> | ||
<td>5</td><td id="name5"></td><td id="score5"></td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<div class="startbuttons"> | ||
<button type="button" class="button start" id="start2" onclick="startGame(2)">Play Animal Match (Original)</button> | ||
<button type="button" class="button start" id="start1v1" onclick="start1v1()">Play Competitive (2 player)</button> | ||
|
||
<button type="button" class="button start" id="start3" onclick="startGame(3)">Play 3-match</button> | ||
<button type="button" class="button start" id="start4" onclick="startGame(4)">Play 4-match</button> | ||
<button type="button" class="button start" id="start6" onclick="startGame(6)">Play 6-match</button> | ||
|
||
<div class="align"> | ||
<label for="snaptogrid">Align cards:</label> | ||
<input type="checkbox" id="snaptogrid" onchange="flipAlignToGrid()"> | ||
</div> | ||
<div class="easy"> | ||
<label for="easymode">Easy Mode:</label> | ||
<input type="checkbox" id="easymode" onchange="flipEasyMode()"> | ||
</div> | ||
</div> | ||
|
||
<button type="button" class="button hidden" id="playagain" onclick="resetGame()">Play Again</button> | ||
<button type="button" class="button hidden" id="menu" onclick="showMenu()">Menu</button> | ||
|
||
<div id="animals"></div> | ||
<div id="cards"></div> | ||
<span id="progress"></span> | ||
|
||
<div id="background" class="left"></div> | ||
<div id="background" class="right"></div> | ||
</body> | ||
|
||
</html> | ||
|
Oops, something went wrong.