# Proposal for Apple Life Game
**Name:** Jungwoo Rhee
**Student ID:** 20234333
**Repository URL:** http://git.prototyping.id/TA/homework5
## Table of Contents
- [Overview](#overview)
- [Game Description](#game-description)
- [Game Mechanics](#game-mechanics)
- [Life Stage Progression](#life-stage-progression)
- [Technology Stack](#technology-stack)
- [Challenges and Milestones](#challenges-and-milestones)
- [Conclusion](#conclusion)
---
## Overview
**Apple Life** reinterprets the classic 2048 puzzle game by replacing numbers with a series of emojis representing the stages of human life. Built using **Svelte**, the game features a reactive UI and smooth animations. When two tiles bearing the same life stage emoji merge, they evolve into the next stage. Reaching the final (11th) stage—the _farmer_—completes the game.
---
## Game Description
In **Apple Life**, players slide the tiles on a grid (using swipes or arrow keys). Each tile displays a unique emoji corresponding to a life stage, starting from a _shovel_ and evolving step by step until the _farmer_ is reached. The gameplay is focused on merging identical stages to create the next evolution stage, symbolizing human growth.
**Key Features:**
- **Dynamic Movement:** All tiles shift in the chosen direction.
- **Merging Logic:** Identical tiles merge to advance to the next life stage.
- **Random Generation:** A new tile is generated after each move.
- **Win Condition:** The game ends successfully when the 11th stage (_farmer_) is achieved.
---
## Game Mechanics
- **Tile Movement:** Controlled via swipes or keyboard arrows.
- **Merging Algorithm:** When two tiles with the same stage meet, they combine and evolve.
- **Random Tile Addition:** Each move introduces a new tile at a random position.
- **End Game:** Successful completion is achieved when a tile representing the "farmer" stage is formed.
---
## Life Stage Progression
The following table shows the 11 life stages of the game, with each stage represented by a distinct emoji. These images are sourced from verified emoji repositories:
| **Stage** | **Emoji/Image** | **Description** |
|:---------:|:---------------:|-----------------------------------------------|
| **1** | | **Shovel** – The tool for beginning work. |
| **2** |
| **Water Drop** – _Nourishment and care._ |
| **3** |
| **Sunlight** – _Energy and warmth._ |
| **4** |
| **Seedling** – _The beginning of growth._ |
| **5** |
| **Herb** – _Early development and potential._ |
| **6** |
| **Potted Plant** – _Nurtured growth in a confined space._ |
| **7** |
| **Tree** – _Strong roots and expansion._ |
| **8** |
| **Flower** – _Blossoming beauty and vitality._ |
| **9** |
| **Green Apple** – _A stage of vibrant life._ |
| **10** |
| **Red Apple** – _Maturity and richness._ |
| **11** |
| **Farmer** – _The culmination of growth (Game Completed)._ |
---
## Technology Stack
- **Svelte:** For reactive UI components and efficient state management.
[Svelte Official Site](https://svelte.dev/)
- **HTML5 & CSS3:** To structure and style the game board.
- **Vanilla JavaScript (within Svelte):** To implement game logic (tile movement, merging, etc.).
- **Local Storage API (optional):** For storing high scores and game progress.
---
## Challenges and Milestones
**Challenges:**
- **Custom Merging Logic:** Transforming numeric merging rules into an emoji-based life progression.
- **Reactive Integration:** Ensuring Svelte correctly handles UI updates with every tile movement and merge.
- **Theme and Visual Consistency:** Accurately representing human growth with a coherent set of emoji stages.
**Milestones:**
1. **Initial Setup:** Project scaffolding and grid display complete.
2. **Core Mechanics:** Tile movement and merging logic implemented.
3. **Final Integration:** Complete life-stage progression with smooth animations and win conditions.
---
## Sample Pseudocode
The following pseudocode is adapted from the [Tile.svelte component](https://github.com/GuilhermeBohnstedt/2048-svelte/blob/main/src/components/Tile.svelte):
```svelte