CoolFace
Apppublic

Ibrahim-Study/addition

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

Simple Addition Game โž•

An interactive educational game designed to teach basic addition (sums up to 5, extendable) to young children. It uses numbers, colorful emojis, or a combination of both to make learning fun and engaging!

๐ŸŽฎ How to Play

The game presents a simple addition problem (e.g., 1 + 2 = ?).

  1. 1.Observe the Problem: See the two numbers to be added.
  2. 2.Choose Display Mode: At the top, select how you want to see the numbers:
  3. 3.Number: Shows only numerals (e.g., 1 and 2).
  4. 4.Object: Shows only emojis (e.g., ๐ŸŽ and ๐ŸŽ๐ŸŽ).
  5. 5.Both: Shows numerals in boxes with emojis underneath each.
  6. 6.Solve: Determine the sum of the two numbers.
  7. 7.Select Answer: Click on one of the three answer options provided at the bottom of the screen. One of these options is the correct sum.
  8. 8.Feedback: The game will tell you if your answer is "Correct! ๐ŸŽ‰" or "Try again! ๐Ÿค”".
  9. 9.New Question: After a correct answer, a new addition problem is automatically generated.

โœจ Features

  • โ€”Visual Learning: Uses numbers, a variety of emojis (fruits, animals, objects, etc.), or both to represent numbers.
  • โ€”Interactive Display Modes: Children can switch between seeing problems as numbers, objects, or a combination, catering to different learning preferences.
  • โ€”Clear Question Format: Presents addition problems in a clear, visual layout (e.g., Num1 + Num2 = ?).
  • โ€”Multiple Choice Answers: Provides three options, making it easy for young children to select their answer.
  • โ€”Immediate Feedback: Instant confirmation of correct or incorrect answers.
  • โ€”Score Tracking: Keeps a simple score of correct answers.
  • โ€”Randomized Questions: Generates addition problems with numbers from 0 to 5, ensuring the sum does not exceed 5 (configurable).
  • โ€”Reduced Zero Probability: The chance of 0 appearing as an operand is intentionally lowered to provide more varied practice.
  • โ€”Responsive Design: Adapts to different screen sizes (desktop, tablet, mobile).
  • โ€”Child-Friendly UI: Large, easy-to-click buttons and clear, colorful visuals.

๐Ÿš€ How to Run

This project is built with React (using Vite) and TypeScript.

Development Mode

bash
# Clone the repository (if you haven't already)
# git clone <repository-url>
# cd <repository-name>

# Install dependencies
npm install

# Start development server
npm run dev

The game will typically be available at http://localhost:5173 (Vite's default port).

Production Build

bash
# Build for production
npm run build

# Preview production build
npm run preview

Docker

If a Dockerfile is configured (the one from the previous game might need adjustments for port or build steps if they changed significantly):

bash
# Build Docker image (example name)
docker build -t addition-game .

# Run container (example mapping to port 3000 on host)
docker run -p 3000:5173 addition-game

๐ŸŽฏ Educational Benefits

  • โ€”Basic Addition Skills: Children practice adding numbers with sums typically up to 5 (can be easily extended).
  • โ€”Number Recognition: Reinforces the visual representation of numbers.
  • โ€”Object Counting: Connects numerals with quantities of objects.
  • โ€”Problem Solving: Encourages children to think through and solve simple math problems.
  • โ€”Visual-Numeric Association: Helps bridge the gap between abstract numbers and concrete objects, especially in "Both" mode.

๐ŸŽจ Emoji Pool

The game uses a diverse pool of emojis to represent objects, including: ๐ŸŽ ๐ŸŠ ๐Ÿ‹ ๐ŸŒ ๐Ÿ‰ ๐Ÿ‡ ๐Ÿ“ ๐Ÿซ ๐Ÿ’ ๐Ÿฅ ๐Ÿถ ๐Ÿฑ ๐Ÿญ ๐Ÿน ๐Ÿฐ ๐ŸฆŠ ๐Ÿป ๐Ÿผ ๐Ÿธ ๐Ÿท โšฝ ๐Ÿ€ ๐ŸŽพ ๐Ÿˆ ๐ŸŽฑ ๐ŸŽจ ๐ŸŽญ ๐ŸŽฏ ๐Ÿš— ๐Ÿš• ๐Ÿš“ ๐Ÿš‘ ๐Ÿš ๐Ÿš€

This pool can be easily modified in src/App.tsx.

๐Ÿ› ๏ธ Technical Details

Technologies Used

  • โ€”React with TypeScript
  • โ€”Vite for build tooling and development server
  • โ€”CSS3 for styling

Project Structure (Key Files)

src/
โ”œโ”€โ”€ App.tsx          # Main game component, logic, and JSX structure
โ”œโ”€โ”€ App.css          # Styling for the game
โ”œโ”€โ”€ main.tsx         # Application entry point
โ””โ”€โ”€ index.css        # Global styles (if any beyond App.css)

public/
โ”œโ”€โ”€ index.html       # HTML template
โ””โ”€โ”€ ...              # Other static assets like favicons

๐Ÿ“ฑ Mobile Support

The game is designed to be responsive and playable on various devices, including desktops, tablets, and mobile phones.

๐Ÿค Contributing

Contributions are welcome! Please follow standard Git practices:

  1. 1.Fork the repository.
  2. 2.Create a new branch for your feature (git checkout -b feature/YourFeature).
  3. 3.Commit your changes (git commit -m 'Add some feature').
  4. 4.Push to the branch (git push origin feature/YourFeature).
  5. 5.Open a Pull Request.

๐Ÿ“„ License

This project is typically licensed under the MIT License (please verify if a LICENSE file exists or add one as appropriate).

๐ŸŽ“ Age Recommendation

This game is suitable for children typically in Preschool to early Elementary grades (ages 3-7) who are beginning to learn:

  • โ€”Number identification
  • โ€”Basic counting
  • โ€”The concept of addition

It can serve as a fun tool for parents and educators to introduce and reinforce these early math skills.


Made with โค๏ธ for young learners everywhere!