update easy_game

This commit is contained in:
Kylin_on_Mac 2022-08-19 13:43:42 +08:00
parent 6097d34b9b
commit 4ae01d4d12
2 changed files with 5 additions and 7 deletions

View File

@ -4,7 +4,7 @@
![pygame](https://img.shields.io/badge/release-2.0.0beta-red.svg)
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)
[![MLGame](https://img.shields.io/badge/MLGame-9.5.1-<COLOR>.svg)](https://github.com/PAIA-Playful-AI-Arena/MLGame)
[![MLGame](https://img.shields.io/badge/MLGame->9.5.3-<COLOR>.svg)](https://github.com/PAIA-Playful-AI-Arena/MLGame)
[![pygame](https://img.shields.io/badge/pygame-2.0.1-<COLOR>.svg)](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

View File

@ -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):