Click here for free DL of the app version that can save data.
No:669 440
Prev Next
Animal
Developer User3055|Date and time 23/6/17 5:35:11
Build time 52.9 sec|Game capacity 4.401KB|Script

Matching Game The objective of this game is to match pairs of animals that are hidden behind tiles. To play, simply tap on a tile to reveal the animal hidden behind it. Then, try to remember the location of that animal and tap on another tile to reveal another animal. If the two animals match, they will stay revealed. If they don’t match, they will be hidden again and you’ll have to try again. The game ends when all pairs have been matched. To implement this game as a single HTML file, we can use JavaScript to create the game board and handle user input. We can also use CSS to style the game board and tiles. Here’s an example implementation:


Animal Matching Game

Tap two tiles to reveal the animals. Match all pairs to win!



In this implementation, we use emoji animals and create a grid of tiles with each animal appearing twice. We shuffle the tiles randomly, and then whenever a tile is clicked, we check if it’s the first or second tile to be clicked. If it’s the first tile, we store it in `firstTile` and flip it over. If it’s the second tile, we store it in `secondTile`, flip it over, and check if it matches the first tile. If there’s a match, we mark the tiles as ”matched” and reset `firstTile` and `secondTile`. If there’s no match, we wait 1 second and then flip both tiles back over. We use CSS to style the tiles with a front and back face, and we add a transition effect to the front face when the tile is flipped over. We also add a shadow and rounded corners to make the tiles look like cards. This game can be played on a smartphone by tapping on the tiles. The game board is responsive and adjusts to the screen size. We can also customize the game by using different animals or images, changing the board size or layout, or adding a timer or score counter.

Prev Next   Back  0  0 Menu 

[PR]現在の新着人気ランキング

Click here for free DL of the app version that can save data.

(C)2023 HisashiApp