Commit 97f72faa authored by Sam Moore's avatar Sam Moore

Add version 1.2 of Celsius

Celsius 1.2 by David Gow (in directory 'celsius')
(The old one is under celsius1.1)

I don't know what was happening before, but it didn't get added.
parent 52489d9b
......@@ -245,6 +245,8 @@ class SulixAI:
self.totalEnemies = {'B':6,'1':1,'2':1,'3':2,'4':3,'5':4,'6':4,'7':4,'8':5,'9':8,'s':1,'F':1}
self.hiddenEnemies = {'B':6,'1':1,'2':1,'3':2,'4':3,'5':4,'6':4,'7':4,'8':5,'9':8,'s':1,'F':1}
self.hiddenAllies = {'B':6,'1':1,'2':1,'3':2,'4':3,'5':4,'6':4,'7':4,'8':5,'9':8,'s':1,'F':1}
self.numEnemies = 6+1+1+2+3+4+4+4+5+8+1+1
self.numStillEnemies = 6+1
self.lastMoved = None
......@@ -318,7 +320,7 @@ class SulixAI:
if override == 1:
scare = 999
scare = 998
elif override == -1:
piece.turnCount = 0
print str(piece.x) + " " + str(piece.y) + " " + directions[dirIndex]
......@@ -485,6 +487,11 @@ class SulixAI:
elif attacker.colour == oppositeColour(self.colour):
self.totalEnemies[attacker.rank] -= 1
self.enemyUnits.remove(attacker)
if attacker.rank == 'B':
self.numStillEnemies -= 1
#if self.numStillEnemies == 0: # There are no bombs left
for i in range(0,ranks['s']):
scaretable[i][ranks['?']] -= 2
elif outcome == "BOTHDIE":
self.board[p[0]][p[1]] = None
......@@ -502,7 +509,6 @@ class SulixAI:
elif attacker.colour == oppositeColour(self.colour):
self.totalEnemies[attacker.rank] -= 1
self.enemyUnits.remove(attacker)
elif outcome == "FLAG":
#sys.stderr.write(" Game over!\n")
return False
......@@ -513,6 +519,9 @@ class SulixAI:
#sys.stderr.write(" Don't understand outcome \"" + outcome + "\"!\n");
return False
#sys.stderr.write(" Completed interpreting move!\n");
return True
......
This diff is collapsed.
Markdown is supported
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