Adds stuff
This commit is contained in:
parent
2d06380a3f
commit
5e65ae1c00
|
@ -1,3 +1,4 @@
|
||||||
assets/
|
assets/
|
||||||
node_modules
|
node_modules
|
||||||
package.lock
|
package.lock
|
||||||
|
*.pyc
|
||||||
|
|
2
pytron
2
pytron
|
@ -1 +1 @@
|
||||||
Subproject commit 0bfec9f0e77905a6ad785bd238e2db509ca9cac9
|
Subproject commit 0ff6f7632dd96fbf0d8c089d821b0124f6267906
|
|
@ -0,0 +1,11 @@
|
||||||
|
"""An AI to try things"""
|
||||||
|
|
||||||
|
from tron.player import Player, Direction
|
||||||
|
|
||||||
|
class Ai(Player):
|
||||||
|
"""" A basic AI"""
|
||||||
|
def __init__(self):
|
||||||
|
super(Ai, self).__init__()
|
||||||
|
|
||||||
|
def action(self, game):
|
||||||
|
return Direction.RIGHT
|
|
@ -0,0 +1,8 @@
|
||||||
|
from tron.player import Player, Direction
|
||||||
|
|
||||||
|
class Ai(Player):
|
||||||
|
def __init__(self):
|
||||||
|
super(Ai, self).__init__()
|
||||||
|
|
||||||
|
def action(self, game):
|
||||||
|
return Direction.LEFT
|
Loading…
Reference in New Issue