Fix
This commit is contained in:
parent
77174a8e42
commit
aa5b65aecc
4
play.py
4
play.py
|
@ -8,8 +8,6 @@ from tron.game import Game, PositionPlayer
|
|||
from tron.window import Window
|
||||
from tron.player import Direction, KeyboardPlayer, Mode
|
||||
|
||||
from ais.wallavoider import Ai
|
||||
|
||||
# This script shows how to create a game with human players and play it interactively.
|
||||
# It shows how to create the game, to setup interactive controls for users, and
|
||||
# to run the game while rendering it on a window with a reasonnable framerate.
|
||||
|
@ -31,7 +29,7 @@ def main():
|
|||
# default direction that will be to the right, and that will use the Z,
|
||||
# Q, S and D keys.
|
||||
# The last array defines the initial position of the player.
|
||||
PositionPlayer(1, Ai(), [0, 0]),
|
||||
PositionPlayer(1, KeyboardPlayer(Direction.RIGHT, Mode.ZQSD), [0, 0]),
|
||||
|
||||
# We create a second player that will use the arrow keys.
|
||||
PositionPlayer(2, KeyboardPlayer(Direction.LEFT, Mode.ARROWS), [width - 1, height - 1]),
|
||||
|
|
Loading…
Reference in New Issue