diff --git a/.gitignore b/.gitignore index fd4f27f..ce153cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ assets/ node_modules package.lock +*.pyc diff --git a/pytron b/pytron index 0bfec9f..0ff6f76 160000 --- a/pytron +++ b/pytron @@ -1 +1 @@ -Subproject commit 0bfec9f0e77905a6ad785bd238e2db509ca9cac9 +Subproject commit 0ff6f7632dd96fbf0d8c089d821b0124f6267906 diff --git a/pytron_run/ai_manager/dummy/ai.py b/pytron_run/ai_manager/dummy/ai.py new file mode 100644 index 0000000..c6eacd5 --- /dev/null +++ b/pytron_run/ai_manager/dummy/ai.py @@ -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 diff --git a/pytron_run/ai_manager/dummy2/ai.py b/pytron_run/ai_manager/dummy2/ai.py new file mode 100644 index 0000000..e15e769 --- /dev/null +++ b/pytron_run/ai_manager/dummy2/ai.py @@ -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