From: Sam Moore Date: Tue, 20 Dec 2011 04:20:36 +0000 (+0800) Subject: Whoops X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=commitdiff_plain;h=cf19b39b4fbc4ae5fd134cfe6c76f7718cc3097f;hp=345d8b1f49dfbc4f569c2dae992e896e6c685d55 Whoops Read the diff Also, forgot to mention progress in simulate.py in last commit. Made progress with total.html results file, and round by round results files. Although since the round number is never updated properly, we only ever get "round1.html", overwritten each round. --- diff --git a/progcomp/agents/basic_python/basic_python.py b/progcomp/agents/basic_python/basic_python.py index 849c6f7..9b427c7 100755 --- a/progcomp/agents/basic_python/basic_python.py +++ b/progcomp/agents/basic_python/basic_python.py @@ -31,13 +31,13 @@ def is_integer(s): def move(x, y, direction, multiplier): """ Moves point (x,y) in direction, returns a pair """ if direction == "UP": - return (x,y-1) + return (x,y-multiplier) elif direction == "DOWN": - return (x,y+1) + return (x,y+multiplier) elif direction == "LEFT": - return (x-1, y) + return (x-multiplier, y) elif direction == "RIGHT": - return (x+1, y) + return (x+multiplier, y) return (x,y)