update easy_game
This commit is contained in:
parent
6097d34b9b
commit
4ae01d4d12
|
@ -4,7 +4,7 @@
|
|||

|
||||
|
||||
[](https://www.python.org/downloads/release/python-390/)
|
||||
[](https://github.com/PAIA-Playful-AI-Arena/MLGame)
|
||||
[](https://github.com/PAIA-Playful-AI-Arena/MLGame)
|
||||
[](https://github.com/pygame/pygame/releases/tag/2.0.1)
|
||||
|
||||
|
||||
|
@ -65,12 +65,10 @@ game = EasyGame(time_to_play=1000, total_point_count=10, score=5, color="FF9800"
|
|||
## 使用AI玩遊戲
|
||||
|
||||
```bash
|
||||
# python MLGame.py [options] easy_game [time_to_play] [total_point_count] [score] [color]
|
||||
python MLGame.py -i ml_play_template.py easy_game --time_to_play 1200 --total_point_count 15 --score 10 --color FF9800
|
||||
# 在easy game中,打開終端機
|
||||
python -m mlgame -i ./ml/ml_play_template.py ./ --time_to_play 1200 --total_point_count 15 --score 10 --color FF9800
|
||||
```
|
||||
|
||||
遊戲參數依序是[`time_to_play`] [`total_point_count`] [`score`] [`color`]
|
||||
|
||||
## AI範例
|
||||
|
||||
```python
|
||||
|
|
|
@ -6,9 +6,9 @@ from mlgame.view.view_model import create_rect_view_data
|
|||
|
||||
BALL_VEL = 10.5
|
||||
|
||||
BALL_H = 100
|
||||
BALL_H = 50
|
||||
|
||||
BALL_W = 10
|
||||
BALL_W = 50
|
||||
|
||||
|
||||
class Ball(pygame.sprite.Sprite):
|
||||
|
|
Loading…
Reference in New Issue