snake -> tron

This commit is contained in:
Thomas Forgione 2019-03-13 21:07:46 +01:00
parent 926d177267
commit 944223e07b
No known key found for this signature in database
GPG Key ID: BFD17A2D71B3B5E7
1 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ examples:
## How to create your own AI
You need to write a class that derives from `snake.player.Player`. You have to
You need to write a class that derives from `tron.player.Player`. You have to
define a constructor, so you can instanciate it, and implement the method
`action` which takes as parameter the map of the game, and returns the
direction you want to take.
@ -56,7 +56,7 @@ For example, you can create a file `myplayer.py` at the root of this repository
containing the following:
``` python
from snake.player import Player, Direction
from tron.player import Player, Direction
class MyPlayer(Player):
def __init__(self):
@ -76,10 +76,10 @@ import contextlib
with contextlib.redirect_stdout(None):
import pygame
from snake.map import Map
from snake.game import Game, PositionPlayer
from snake.window import Window
from snake.player import Player, Direction, ConstantPlayer, KeyboardPlayer
from tron.map import Map
from tron.game import Game, PositionPlayer
from tron.window import Window
from tron.player import Player, Direction, ConstantPlayer, KeyboardPlayer
def main():
pygame.init()