snake -> tron
This commit is contained in:
parent
926d177267
commit
944223e07b
12
README.md
12
README.md
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue