git.ucc.asn.au
/
progcomp2012.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[RULE CHANGE] *Changed rule for Bombs*, tweaking vixen agent
[progcomp2012.git]
/
progcomp
/
agents
/
basic_python
/
basic_python.py
diff --git
a/progcomp/agents/basic_python/basic_python.py
b/progcomp/agents/basic_python/basic_python.py
index
919d1a2
..
b384838
100755
(executable)
--- a/
progcomp/agents/basic_python/basic_python.py
+++ b/
progcomp/agents/basic_python/basic_python.py
@@
-62,6
+62,7
@@
class Piece:
self.y = y
self.lastMoved = -1
self.beenRevealed = False
self.y = y
self.lastMoved = -1
self.beenRevealed = False
+ self.positions = [(x, y)]
def mobile(self):
return self.rank != 'F' and self.rank != 'B' and self.rank != '?' and self.rank != '+'
def mobile(self):
return self.rank != 'F' and self.rank != 'B' and self.rank != '?' and self.rank != '+'
@@
-247,8
+248,10
@@
class BasicAI:
defender = self.board[p[0]][p[1]]
#Update attacker's position (Don't overwrite the board yet though)
defender = self.board[p[0]][p[1]]
#Update attacker's position (Don't overwrite the board yet though)
+
attacker.x = p[0]
attacker.y = p[1]
attacker.x = p[0]
attacker.y = p[1]
+ attacker.positions.insert(0, (attacker.x, attacker.y))
#Determine ranks of pieces if supplied
#Determine ranks of pieces if supplied
UCC
git Repository :: git.ucc.asn.au