Commit 30476a55 authored by Ralf's avatar Ralf
Browse files

add a Thing class; add command-line parsing

parent 21a0f291
from game import Game
import argparse
game = Game()
# Parse arguments
parser = argparse.ArgumentParser(description='Run a door')
parser.add_argument("-p", "--port", default=1234, type=int, dest="port",
help="Port to listen on (default: 1234)")
parser.add_argument("-l", "--labyrinth-file", required=True, dest="labyrinthFileName",
help="Fallback mode for unfunctional hardware: Depend on less sensor input")
args = parser.parse_args()
game = Game(labyrinthFileName=args.labyrinthFileName, port=args.port)
class Thing():
def __init__(self):
self.field = None
def onMove(self, newField):
return True
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment