summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-07-24 04:49:29 +0200
committerGuillaume Seguin <guillaume@segu.in>2007-07-24 04:49:29 +0200
commit7c47de1c9b40faf52eaf939f5e67fc7b19b6b686 (patch)
tree6b0472db175a61995807ca19be8720c215559d63
parent8a591d4d903430620f5961c339079cf893d6ef79 (diff)
downloadtictactoe-7c47de1c9b40faf52eaf939f5e67fc7b19b6b686.tar.gz
tictactoe-7c47de1c9b40faf52eaf939f5e67fc7b19b6b686.tar.bz2
* Minor improvement
-rwxr-xr-xtictactoe.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tictactoe.py b/tictactoe.py
index cf7a954..b83b169 100755
--- a/tictactoe.py
+++ b/tictactoe.py
@@ -111,6 +111,9 @@ class gtkTicTacToe (gtk.DrawingArea):
def computer_turn_smart (self):
'''Computer IA, much less random'''
+ if not self._map[1][1]:
+ self._map[1][1] = COMPUTER_ID
+ return
for i in range (3):
xv1 = self._map[i][0]
xv2 = self._map[i][1]