Skip to content

Latest commit

 

History

History
 
 

Memory Puzzle Game

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Package/Script Name

MEMORY_PUZZLE_GAME

Aim

To create a memory game.


Purpose

The purpose of this project is to create a pygame for fun also increases the concentration

Short description of package/script

The program runs a memory game that allows you to turn over cards by clicking the mouse.


Setup instructions

Copy the project to your local enviroment and that's all this code can be run on any python IDE.

Workflow of the Project

  • Importing the required modules
  • Setting Up the Buttons for game
  • The main() Function to execute all the functions in the program.
  • Declaring Some Local Variables Used in This Program
  • Drawing the Board and Handling Input for output window
  • Checking for Mouse Clicks
  • Checking for Keyboard Presses
  • The Two States of the Game Loop
  • Figuring Out if the Player Pressed the Right Buttons
  • Reusing The Constant Variables
  • Animating the Button Flash
  • Drawing the Buttons
  • Animating the Background Change
  • The Game Over Animation
  • Converting from Pixel Coordinates to Buttons

Compilation Steps

Download the python code named app.py

Extract the files and keep both in same folder.

Run the code by double clicking them.

Enjoy the Game..

Detailed explanation of script, if needed

OUR GAME RULES

  • The program runs a memory game that allows you to turn over cards by clicking the mouse.
  • Each grey box represents the image of an animal hidden by default.
  • If there is a match, the two cards will disappear, leaving a blank white space and giving a message "MATCHED".
  • If not, they will flip back over.

!

Output

Author(s)

HitainKakkar

Disclaimers, if any

NO