Adds stuff
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
assets/
|
assets/
|
||||||
node_modules
|
node_modules
|
||||||
package.lock
|
package.lock
|
||||||
|
*.pyc
|
||||||
|
|||||||
+1
-1
Submodule pytron updated: 0bfec9f0e7...0ff6f7632d
@@ -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
|
||||||
Reference in New Issue
Block a user