File size: 5,570 Bytes
580f6a6
671ec71
 
 
 
580f6a6
 
671ec71
580f6a6
671ec71
580f6a6
671ec71
580f6a6
0b49cb3
a432b46
671ec71
3e4b4c2
671ec71
 
 
 
 
 
 
 
 
3e4b4c2
0b49cb3
a432b46
671ec71
 
 
 
 
 
 
 
 
 
f149040
0b49cb3
a432b46
671ec71
 
 
a432b46
 
671ec71
 
 
0b49cb3
a432b46
 
 
 
 
0b49cb3
a432b46
671ec71
0b49cb3
671ec71
0b49cb3
 
a432b46
 
0b49cb3
 
 
 
 
671ec71
 
 
0b49cb3
 
671ec71
 
0b49cb3
671ec71
 
0b49cb3
 
 
 
671ec71
 
 
 
 
0b49cb3
671ec71
0b49cb3
671ec71
 
0b49cb3
671ec71
0b49cb3
 
 
 
 
671ec71
 
 
 
 
 
0b49cb3
 
671ec71
 
 
 
0b49cb3
 
671ec71
 
0b49cb3
 
 
 
671ec71
0b49cb3
 
 
671ec71
 
 
 
 
 
 
0b49cb3
 
 
671ec71
0b49cb3
 
 
671ec71
 
 
 
 
0b49cb3
671ec71
0b49cb3
 
 
671ec71
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
title: Addition Game
emoji: 
colorFrom: green
colorTo: blue
sdk: docker
pinned: false
app_port: 7860 # Assuming Vite default port, adjust if different after changes
---
# 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.  **Observe the Problem**: See the two numbers to be added.
2.  **Choose Display Mode**: At the top, select how you want to see the numbers:
    *   **Number**: Shows only numerals (e.g., `1` and `2`).
    *   **Object**: Shows only emojis (e.g., 🍎 and 🍎🍎).
    *   **Both**: Shows numerals in boxes with emojis underneath each.
3.  **Solve**: Determine the sum of the two numbers.
4.  **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.
5.  **Feedback**: The game will tell you if your answer is "Correct! 🎉" or "Try again! 🤔".
6.  **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.  Fork the repository.
2.  Create a new branch for your feature (`git checkout -b feature/YourFeature`).
3.  Commit your changes (`git commit -m 'Add some feature'`).
4.  Push to the branch (`git push origin feature/YourFeature`).
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!