X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=samples%2Fbasic_python%2Fbasic_python.py;h=cf024e8d45ae9c67256f325b4ec82432d10f228f;hp=be88d561293c6d9400d6306ec4ec4fffd23404b9;hb=17a20de4017ccfadef219d830a28ecccfe6f5106;hpb=2120cc40abf9e3fd763c84a1e09b61064bb40be6 diff --git a/samples/basic_python/basic_python.py b/samples/basic_python/basic_python.py index be88d56..cf024e8 100644 --- a/samples/basic_python/basic_python.py +++ b/samples/basic_python/basic_python.py @@ -87,6 +87,8 @@ class BasicAI: """ Implements Setup part of protocol. Always uses the same setup. Override to create custom setups """ #sys.stderr.write("BasicAI Setup here...\n"); setup = sys.stdin.readline().split(' ') + if len(setup) != 4: + sys.stderr.write("BasicAI setup fails, expected 4 tokens, got " + str(len(setup)) + " "+str(setup) + "\n") self.colour = setup[0] self.opponentName = setup[1] self.width = int(setup[2])