Inspiration
I've always been interested in the idea of making learning fun. As someone who has personally experienced the challenges of learning a second language, I wanted to create simple, fun, and educational products. My inspiration came from traditional memory-matching card games, and I wondered, "What if the cards didn't have pictures, but bilingual vocabulary?"
This idea ultimately led to the creation of a memory card game (bilingual edition). I chose Chinese and English as the game languages because I myself have a bilingual background and wanted to help others learn basic vocabulary in a relaxed and fun way.
What it does
Memory Card Game is a bilingual matching game where each pair of cards contains an English number (e.g. "Nine") and its corresponding Chinese character ("九").
Players flip over two cards each turn. If the cards match, they remain flipped over. If they don't match, they are flipped back to their original positions on the next click. The game provides feedback (e.g. "Good job, keep it up!" or "Oops, try again next time!") to keep players engaged. When all cards are matched, the game displays the final message, and the player wins.
How we built it
This project was built entirely in Java using the BlueJ environment, and it is structured into four main classes:
Main Class This class launches the entire program by opening the Start Page. It acts as the entry point and keeps the overall project organized.
StartPage Class This class creates the initial screen that players see. It also handles navigation, opening the game when the player clicks the "Chinese-English" button.
Card Class This class represents each card on the board. It stores the card’s value (English or Chinese) and checks whether it is currently matched. It also includes the
reveal()andhide()methods that control what each card displays.MemoryCardGame Class This is the core of the project and contains all main game logic: generating the bilingual pairs, shuffling cards, tracking selected cards (first card and second card), matching logic that checks if two cards share the same meaning, updating the interface, file handling (reading a message from a text file at the end), exception handling throughout the game to prevent crashes.
All interactions — clicking cards, revealing matches, and ending the game — are processed here.
Challenges we ran into
Some of the most difficult parts of the project included:
-Card State Management: Ensuring unmatched cards were correctly hidden after the next click consumed significant debugging time.
-Unexpected Double-Click Errors: Clicking the same card twice caused unexpected behavior, requiring careful condition checks.
-Matching Logic: Writing error-free bilingual matching rules proved unexpectedly tricky.
-File I/O Errors: Reading data from external files generated path-related errors, forcing me to design safer and more flexible file handling code.
-GUI Timing and User Interaction: Ensuring smooth game performance without using timers or thread delays was a unique challenge.
Accomplishments that we're proud of
-I built a fully functional bilingual educational game from scratch.
-The UI is simple, clean, and pleasant for players.
-The project handles exceptions safely, preventing crashes.
-I implemented file reading successfully to customize the end-game message.
Most importantly, the game feels fun and rewarding to play.
What we learned
Throughout this project, I learned:
-How to build interactive GUIs in Java.
-How to manage game state and user input cleanly.
-How exception handling keeps a project stable.
-How file reading works in Java and how paths behave differently on different systems.
-How small details—like when cards flip back—can dramatically change the user experience.
This project also improved my debugging skills and helped me think more logically about program flow and UI updates.
What's next for Memory Card Game (Bilingual Edition)
There are several exciting ideas for future improvements:
-Adding more vocabulary categories (animals, colors, verbs, etc.)
-Allowing players to select difficulty levels or grid sizes
-Introducing animations and sound effects
-Building a mobile version using a cross-platform framework
-Adding more languages beyond Chinese and English
Built With
- bluej
- java
Log in or sign up for Devpost to join the conversation.