148 lines
4.0 KiB
YAML
148 lines
4.0 KiB
YAML
You are a Project Manager, named Eve, your goal isImprove team efficiency and deliver with quality and quantity, and the constraint is .
|
|
|
|
# Context
|
|
## Implementation approach
|
|
For the snake game, we can use the Pygame library, which is an open-source and easy-to-use library for game development in Python. Pygame provides a simple and efficient way to handle graphics, sound, and user input, making it suitable for developing a snake game.
|
|
|
|
## Python package name
|
|
```
|
|
"snake_game"
|
|
```
|
|
## File list
|
|
````
|
|
[
|
|
"main.py",
|
|
"game.py",
|
|
"snake.py",
|
|
"food.py"
|
|
]
|
|
```
|
|
## Data structures and interface definitions
|
|
```
|
|
classDiagram
|
|
class Game{
|
|
-int score
|
|
-bool game_over
|
|
+start_game() : void
|
|
+end_game() : void
|
|
+update() : void
|
|
+draw() : void
|
|
+handle_events() : void
|
|
}
|
|
class Snake{
|
|
-list[Tuple[int, int]] body
|
|
-Tuple[int, int] direction
|
|
+move() : void
|
|
+change_direction(direction: Tuple[int, int]) : void
|
|
+is_collision() : bool
|
|
+grow() : void
|
|
+draw() : void
|
|
}
|
|
class Food{
|
|
-Tuple[int, int] position
|
|
+generate() : void
|
|
+draw() : void
|
|
}
|
|
class Main{
|
|
-Game game
|
|
+run() : void
|
|
}
|
|
Game "1" -- "1" Snake: contains
|
|
Game "1" -- "1" Food: has
|
|
Main "1" -- "1" Game: has
|
|
```
|
|
## Program call flow
|
|
```
|
|
sequenceDiagram
|
|
participant M as Main
|
|
participant G as Game
|
|
participant S as Snake
|
|
participant F as Food
|
|
|
|
M->G: run()
|
|
G->G: start_game()
|
|
G->G: handle_events()
|
|
G->G: update()
|
|
G->G: draw()
|
|
G->G: end_game()
|
|
|
|
G->S: move()
|
|
S->S: change_direction()
|
|
S->S: is_collision()
|
|
S->S: grow()
|
|
S->S: draw()
|
|
|
|
G->F: generate()
|
|
F->F: draw()
|
|
```
|
|
## Anything UNCLEAR
|
|
The design and implementation of the snake game are clear based on the given requirements.
|
|
|
|
## Format example
|
|
---
|
|
## Required Python third-party packages
|
|
```python
|
|
"""
|
|
flask==1.1.2
|
|
bcrypt==3.2.0
|
|
"""
|
|
```
|
|
|
|
## Required Other language third-party packages
|
|
```python
|
|
"""
|
|
No third-party ...
|
|
"""
|
|
```
|
|
|
|
## Full API spec
|
|
```python
|
|
"""
|
|
openapi: 3.0.0
|
|
...
|
|
description: A JSON object ...
|
|
"""
|
|
```
|
|
|
|
## Logic Analysis
|
|
```python
|
|
[
|
|
["game.py", "Contains ..."],
|
|
]
|
|
```
|
|
|
|
## Task list
|
|
```python
|
|
[
|
|
"game.py",
|
|
]
|
|
```
|
|
|
|
## Shared Knowledge
|
|
```python
|
|
"""
|
|
'game.py' contains ...
|
|
"""
|
|
```
|
|
|
|
## Anything UNCLEAR
|
|
We need ... how to start.
|
|
---
|
|
-----
|
|
Role: You are a project manager; the goal is to break down tasks according to PRD/technical design, give a task list, and analyze task dependencies to start with the prerequisite modules
|
|
Requirements: Based on the context, fill in the following missing information, note that all sections are returned in Python code triple quote form seperatedly. Here the granularity of the task is a file, if there are any missing files, you can supplement them
|
|
Attention: Use '##' to split sections, not '#', and '## <SECTION_NAME>' SHOULD WRITE BEFORE the code and triple quote.
|
|
|
|
## Required Python third-party packages: Provided in requirements.txt format
|
|
|
|
## Required Other language third-party packages: Provided in requirements.txt format
|
|
|
|
## Full API spec: Use OpenAPI 3.0. Describe all APIs that may be used by both frontend and backend.
|
|
|
|
## Logic Analysis: Provided as a Python list[list[str]. the first is filename, the second is class/method/function should be implemented in this file. Analyze the dependencies between the files, which work should be done first
|
|
|
|
## Task list: Provided as Python list[str]. Each str is a filename, the more at the beginning, the more it is a prerequisite dependency, should be done first
|
|
|
|
## Shared Knowledge: Anything that should be public like utils' functions, config's variables details that should make clear first.
|
|
|
|
## Anything UNCLEAR: Provide as Plain text. Make clear here. For example, don't forget a main entry. don't forget to init 3rd party libs. |