|
| 1 | +<p align="center"> |
| 2 | + <img src="docs/img/logo.svg" alt="Project Logo" width="200"/> |
| 3 | +</p> |
| 4 | + |
| 5 | +# 👾 Tetris Bugs: The Code Editor You Never Asked For |
| 6 | + |
| 7 | +Built by **Grand Gardenias** for Python Discord's Summer CodeJam 2025. Challenge theme: **Wrong Tool for the Job** using **Python in the Browser** via [Pyscript](https://pyscript.net/). |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## 🎯 The Concept |
| 12 | + |
| 13 | +Instead of typing code like a normal human, you now have to **catch falling code blocks** and arrange them into working programs. |
| 14 | + |
| 15 | +## 🎮 Game Modes (Choose Your Suffering) |
| 16 | + |
| 17 | +### 1. 🏗️ Tetris Code Editor |
| 18 | + |
| 19 | +- New File |
| 20 | +- Export/Save |
| 21 | +- Undo/Redo |
| 22 | +- Run Code |
| 23 | +- Terminal Output |
| 24 | +- Code Falls from Sky |
| 25 | + |
| 26 | +### 2. ⚡ CodeRush Mode |
| 27 | + |
| 28 | +- 5-minute timer counting down |
| 29 | +- Questions show up on the left |
| 30 | +- Solve as many as you can before time’s up |
| 31 | +- Your score = how many problems you solved before the end |
| 32 | + |
| 33 | +### 3. 🗡️ Roguelike Mode |
| 34 | + |
| 35 | +- We provide the CORRECT solution |
| 36 | +- Arrange the blocks properly to "clear" lines like Tetris |
| 37 | +- Wrong arrangements stack up |
| 38 | +- Reach the top = GAME OVER |
| 39 | + |
| 40 | +### 4. We could not finish the multiplayer mode, but it is documented in [docs/goals.md](docs/goals.md) |
| 41 | + |
| 42 | +## 🛠️ Tech Stack |
| 43 | + |
| 44 | +- **PyScript** |
| 45 | +- **TailwindCSS** |
| 46 | + |
| 47 | +## 📦 Requirements |
| 48 | + |
| 49 | +- Python 3.13+ |
| 50 | +- Node.js & npm |
| 51 | + |
| 52 | +## ⚙️ Setup Instructions |
| 53 | + |
| 54 | +1. Clone the repository: |
| 55 | + ```shell |
| 56 | + git clone https://github.com/zishankadri/tetris-bugs.git |
| 57 | + cd tetris-bugs |
| 58 | + ``` |
| 59 | +3. Start a local Server: |
| 60 | + ```shell |
| 61 | + cd frontend |
| 62 | + npm install |
| 63 | + npm run build |
| 64 | + python -m http.server |
| 65 | + ``` |
| 66 | + |
| 67 | +3. **Open Your Browser** to `http://localhost:8000` |
| 68 | +4. 💡 For Contributors: Run `npm run dev` to auto-update Tailwind while you code. |
| 69 | + |
| 70 | +## 🎉 Achievement Unlocked |
| 71 | +**Congratulations! You now have the most unique answer to "What IDE do you use?"** |
| 72 | + |
| 73 | +*"Oh, I use Tetris."* |
| 74 | + |
| 75 | +## Video Presentation |
| 76 | +[code-editor.webm](https://github.com/user-attachments/assets/cf059496-4f29-4d98-a95a-8969f91b333e) |
| 77 | + |
| 78 | +<details> |
| 79 | + <summary>⚡ CodeRush Video Presentation </summary> |
| 80 | + https://drive.google.com/file/d/1t6_92z2R_ntOok2yyzjklHpKyxoKZl_g/view |
| 81 | +</details> |
| 82 | + |
| 83 | +<details> |
| 84 | + <summary>🗡️ Roguelike (BETA) Video Presentation </summary> |
| 85 | + |
| 86 | +[roguelike.webm](https://github.com/user-attachments/assets/ffc35054-e3de-4e12-ac63-f1e3520f2ee8) |
| 87 | +</details> |
| 88 | + |
| 89 | +## 📸 Screenshots |
| 90 | +<details> |
| 91 | + <summary>Preview Images 📸</summary> |
| 92 | + <img width="1314" height="655" alt="code-editor" src="https://github.com/user-attachments/assets/d3d61ead-39b7-44e8-b62f-207709f3b1b6" /> |
| 93 | + <img width="1360" height="676" alt="code-editor" src="https://github.com/user-attachments/assets/b8d619c7-280e-4e5e-b9b6-c59bfa21ccf9" /> |
| 94 | + <img width="1360" height="768" alt="code-rush" src="https://github.com/user-attachments/assets/6f6c9027-1017-43cc-95ef-c971d493ccb7" /> |
| 95 | + <img width="1360" height="676" alt="roguelike" src="https://github.com/user-attachments/assets/4142aa8b-012b-4f29-85a0-8624e1ef33e5" /> |
| 96 | + <img width="1311" height="655" alt="menu" src="https://github.com/user-attachments/assets/1220ca0c-c8a3-49f1-a50d-1bd76965e989" /> |
| 97 | + |
| 98 | +</details> |
| 99 | + |
| 100 | +## 🎯 Wrong Tool for the Job |
| 101 | + |
| 102 | +✅ Using Tetris as an IDE |
| 103 | +✅ Spatial reasoning for coding problems |
| 104 | + |
| 105 | +With some tweaks and backend, this could be a useful tool as a coding qualifier, as we doubt any LLM alone could pass this test. |
| 106 | + |
| 107 | +## 🤝 Credits |
| 108 | + |
| 109 | +(in order of contributed LOC): |
| 110 | + |
| 111 | +<table> |
| 112 | + <tr> |
| 113 | + <th></th> |
| 114 | + <th>Name</th> |
| 115 | + <th>Contributions</th> |
| 116 | + </tr> |
| 117 | + <tr> |
| 118 | + <td><a href="https://github.com/zishankadri"><img src="https://github.com/zishankadri.png" alt="Luffy" width="64"></a></td> |
| 119 | + <td><a href="https://github.com/zishankadri">Luffy</a></td> |
| 120 | + <td>Lead developer, Project architecture, Ideation, Frontend</td> |
| 121 | + </tr> |
| 122 | + <tr> |
| 123 | + <td><a href="https://github.com/rxdiationx"><img src="https://github.com/rxdiationx.png" alt="rxdiationx" width="64"></a></td> |
| 124 | + <td><a href="https://github.com/rxdiationx">rxdiationx</a></td> |
| 125 | + <td>Base of CodeRush, sound effects/music, loading screen, Sourcing of problems</td> |
| 126 | + </tr> |
| 127 | + <tr> |
| 128 | + <td><a href="https://github.com/Sapient44"><img src="https://github.com/Sapient44.png" alt="Sapient44" width="64"></a></td> |
| 129 | + <td><a href="https://github.com/Sapient44">Sapient44</a></td> |
| 130 | + <td>Terminal and code execution, Modifications in roguelike mode, Sourcing of audio</td> |
| 131 | + </tr> |
| 132 | + <tr> |
| 133 | + <td><a href="https://github.com/Shivk123"><img src="https://github.com/Shivk123.png" alt="Shivk123" width="64"></a></td> |
| 134 | + <td><a href="https://github.com/Shivk123">Shivk123</a></td> |
| 135 | + <td>Meeting facilitation, Initial file structure, Set up Flask backend</td> |
| 136 | + </tr> |
| 137 | + <tr> |
| 138 | + <td><a href="https://github.com/mhasanali2010"><img src="https://github.com/mhasanali2010.png" alt="mhasanali2010" width="64"></a></td> |
| 139 | + <td><a href="https://github.com/mhasanali2010">mhasanali2010</a></td> |
| 140 | + <td>timer logic, pause screen</td> |
| 141 | + </tr> |
| 142 | +</table> |
0 commit comments