Skip to content

MSTC-DA-IICT/Hacktoberfest2k25_cpp_MemoryCardFlipGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Memory Card Flip Game ๐Ÿƒ

Hacktoberfest License: MIT Build Status C++ raylib

A classic memory card flip game built with C++ and raylib graphics library. Match pairs of cards to win! Perfect for learning game development and contributing to open source during Hacktoberfest 2025.

๐ŸŽฎ Game Features

  • ๐Ÿ”€ Randomized Card Layout: Cards are shuffled each game
  • โฑ๏ธ Timer: Track your completion time
  • ๐Ÿ“Š Score System: Points based on matches and time
  • ๐ŸŽจ Beautiful Graphics: Clean, modern UI with smooth animations
  • ๐Ÿ”Š Sound Effects: Audio feedback for card flips and matches
  • ๐Ÿ“ฑ Multiple Difficulty Levels: 4x4, 6x6, and 8x8 grids
  • ๐Ÿ† High Score Tracking: Save your best times locally

๐Ÿš€ Quick Start

Prerequisites

  • C++17 or later
  • CMake 3.16 or later
  • raylib 5.0 (automatically downloaded by CMake)

Installation & Running

  1. Clone the repository:

    git clone https://github.com/MSTC-DA-IICT/Hacktoberfest2k25_cpp_MemoryCardFlipGame.git
    
  2. Build the project:

    mkdir build && cd build
    cmake ..
    make -j4
  3. Run the game:

    ./memory_game

Alternative Build Methods

Using Visual Studio (Windows)

  1. Open the project folder in Visual Studio 2022
  2. Select CMakeLists.txt as the CMake project
  3. Build and run with F5

Using VS Code

  1. Install the C/C++ and CMake Tools extensions
  2. Open the project folder
  3. Select a kit when prompted
  4. Press F7 to build and F5 to debug

๐ŸŽฏ How to Play

  1. Click on any card to flip it and reveal the symbol
  2. Click on another card to find its matching pair
  3. Match all pairs to complete the level!
  4. Try to complete in the shortest time with fewest moves

Game Rules

  • Only 2 cards can be flipped at once
  • If cards match, they stay revealed
  • If cards don't match, they flip back after 1 second
  • Game ends when all pairs are found

๐Ÿ› ๏ธ Project Structure

memory-card-game/
โ”œโ”€โ”€ src/                    # Source files
โ”‚   โ”œโ”€โ”€ main.cpp           # Entry point
โ”‚   โ”œโ”€โ”€ Game.cpp           # Game logic
โ”‚   โ”œโ”€โ”€ Card.cpp           # Card implementation
โ”‚   โ”œโ”€โ”€ GameBoard.cpp      # Board management
โ”‚   โ””โ”€โ”€ Utils.cpp          # Utility functions
โ”œโ”€โ”€ include/               # Header files
โ”‚   โ”œโ”€โ”€ Game.h
โ”‚   โ”œโ”€โ”€ Card.h
โ”‚   โ”œโ”€โ”€ GameBoard.h
โ”‚   โ””โ”€โ”€ Utils.h
โ”œโ”€โ”€ assets/                # Game assets
โ”‚   โ”œโ”€โ”€ textures/          # Card textures and sprites
โ”‚   โ”œโ”€โ”€ sounds/            # Audio files
โ”‚   โ””โ”€โ”€ fonts/             # Custom fonts
โ”œโ”€โ”€ tests/                 # Unit tests
โ”œโ”€โ”€ docs/                  # Documentation
โ”œโ”€โ”€ CMakeLists.txt         # Build configuration
โ”œโ”€โ”€ README.md              # This file
โ”œโ”€โ”€ CONTRIBUTING.md        # Contribution guidelines
โ””โ”€โ”€ LICENSE                # MIT License

๐Ÿ”ง Development Setup

Adding New Features

  1. Fork this repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes in the appropriate files
  4. Test your changes: make test
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to your fork: git push origin feature/amazing-feature
  7. Open a Pull Request

Code Style Guidelines

  • Use 4 spaces for indentation
  • Follow camelCase for variables and functions
  • Use PascalCase for classes
  • Add comments for complex logic
  • Include unit tests for new features

๐Ÿค Contributing to Hacktoberfest

This project is participating in Hacktoberfest 2025! We welcome contributions from developers of all skill levels.

Good First Issues ๐ŸŒŸ

Look for issues labeled with:

  • good-first-issue - Perfect for beginners
  • hacktoberfest - Hacktoberfest-specific issues
  • help-wanted - We need your expertise!

Contribution Areas

  • ๐Ÿ› Bug Fixes: Fix gameplay bugs or visual glitches
  • โœจ New Features: Add power-ups, themes, or game modes
  • ๐ŸŽจ Graphics: Improve UI/UX or add new card designs
  • ๐Ÿ”Š Audio: Add sound effects or background music
  • ๐Ÿ“– Documentation: Improve README, add tutorials
  • ๐Ÿงช Testing: Write unit tests or integration tests
  • ๐Ÿ”ง Performance: Optimize game performance

Getting Help

Read our full Contributing Guidelines for detailed information.

๐Ÿซ About MSTC DA-IICT

This project is maintained by the Microsoft Student Technical Club (MSTC) at Dhirubhai Ambani Institute of Information and Communication Technology (DA-IICT).

Our Mission

We aim to foster open-source development, provide learning opportunities, and build a collaborative community of tech enthusiasts.

๐Ÿ“š Learning Resources

Game Development with raylib

C++ Resources

Open Source & Git

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • raylib community for the amazing graphics library
  • MSTC DA-IICT members for their contributions
  • Hacktoberfest for promoting open-source development
  • All contributors who help make this project better!

๐ŸŒŸ Show Your Support

If you found this project helpful:

  • โญ Star this repository
  • ๐Ÿด Fork it for your own experiments
  • ๐Ÿ“ข Share it with friends
  • ๐Ÿค Contribute to make it better!

Happy Coding! ๐Ÿš€

Made with โค๏ธ by MSTC DA-IICT for Hacktoberfest 2025