This is an interactive Next.js app for practicing integer addition and subtraction using a visual number line and a character named Stacy. The app is designed for educational purposes and features sound, background images, and dynamic questions.
Visit the deployed version here: https://integer-operations.vercel.app/
- Interactive Number Line: Click on the number line to move Stacy to the answer.
- Dynamic Questions: Generate random addition and subtraction questions.
- Visual Feedback: Stacy's icon changes based on correct or incorrect answers.
- Sound Effects: Background music plays when the page loads.
- Responsive Design: Styled with Tailwind CSS and custom backgrounds.
-
Clone the repository:
git clone https://github.com/yourusername/integer_operations_game.git cd integer_operations_game -
Install dependencies:
npx next install # or yarn install -
Add assets:
- Place your character images (
questioning.png,right_answer.png,wrong_answer.png) and background image (background1.png) in thepublicfolder. - Place your sound file (
bgm_9am.mp3) in thepublicfolder.
- Place your character images (
npm run dev
# or
yarn devVisit http://localhost:3000 in your browser.
src/
app/
page.tsx # Main app logic and UI
layout.tsx # Global layout and fonts
public/
charIcon images # Character images
background1.png # Background image
bgm_9am.mp3 # Sound file
This app is ready to deploy on Vercel.
- Questions: Modify the logic in
generateQuestion()inpage.tsx. - Character Images: Update the image files in the
publicfolder. - Sound: Replace
bgm_9am.mp3with your own audio file.
MIT
- Character and background images: © Nintendo / Animal Crossing (for educational demo only)
- Sound: Replace with your own or use royalty