geek-ai / MAgent

A Platform for Many-Agent Reinforcement Learning
MIT License
1.68k stars 332 forks source link

TypeError: Argument must be rect style object #6

Closed liuminggao closed 6 years ago

liuminggao commented 6 years ago

(I already run show_battle_game.py successfully with python2)

python3 examples/show_battle_game.py

error as follows

Traceback (most recent call last):
  File "examples/show_battle_game.py", line 15, in <module>
    PyGameRenderer().start(Server())
  File "/home/minghigh/Desktop/MAgent/python/magent/renderer/pygame_renderer.py", line 281, in start
    now_group[1] * grid_size
  File "/home/minghigh/Desktop/MAgent/python/magent/renderer/pygame_renderer.py", line 52, in draw_rect
    map(int, (round(a[0]), round(a[1]), round(w + a[0] - round(a[0])), round(h + a[1] - round(a[1]))))
TypeError: Argument must be rect style object
Kipsora commented 6 years ago

Thanks for your bug reporting. I have adjusted our codes to be compatible with python3.