Skip to content

Commit

Permalink
animal match game
Browse files Browse the repository at this point in the history
  • Loading branch information
Niraj1608 committed Nov 10, 2024
1 parent 832a385 commit f04ea5b
Show file tree
Hide file tree
Showing 52 changed files with 1,317 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Link Up Game/README.md
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!
Binary file added Link Up Game/assets/animals/beaver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/crab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/crocodile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/dog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/dolphin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/duck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/flamingo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/giraffe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/horse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/koala.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/lizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/octopus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/peacock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/penguin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/sheep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/snail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/snake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/squirrel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/swan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/animals/unicorn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/card.ico
Binary file not shown.
Binary file added Link Up Game/assets/card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/cards/card,.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/cards/carda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/cards/cardb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Link Up Game/assets/cards/cardc.png
Binary file added Link Up Game/assets/cards/cardd.png
Binary file added Link Up Game/assets/cards/carde.png
Binary file added Link Up Game/assets/cards/cardf.png
Binary file added Link Up Game/assets/cards/cardh.png
Binary file added Link Up Game/assets/cards/cardi.png
Binary file added Link Up Game/assets/cards/cardj.png
Binary file added Link Up Game/assets/cards/cardk.png
Binary file added Link Up Game/assets/cards/cardl.png
Binary file added Link Up Game/assets/cards/cardm.png
Binary file added Link Up Game/assets/cards/cardn.png
Binary file added Link Up Game/assets/cards/cardo.png
Binary file added Link Up Game/assets/cards/cardp.png
Binary file added Link Up Game/assets/cards/cardq.png
Binary file added Link Up Game/assets/cards/cardr.png
Binary file added Link Up Game/assets/cards/cards.png
Binary file added Link Up Game/assets/cards/cardu.png
Binary file added Link Up Game/assets/cards/cardv.png
Binary file added Link Up Game/assets/cards/cardw.png
Binary file added Link Up Game/assets/cards/cardx.png
Binary file added Link Up Game/assets/cards/cardz.png
72 changes: 72 additions & 0 deletions Link Up Game/index.html
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>

Loading

0 comments on commit f04ea5b

Please sign in to comment.