summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-07-24 05:00:06 +0200
committerGuillaume Seguin <guillaume@segu.in>2007-07-24 05:00:06 +0200
commit1d080659da0d9ea26e800a060b4019b5697ff564 (patch)
treefd1f28dd52554ee1f111fcbc30caff3d8b0b6e34
parent4edc68161d7b11c0394d54b1479eece902d3b662 (diff)
downloadtictactoe-1d080659da0d9ea26e800a060b4019b5697ff564.tar.gz
tictactoe-1d080659da0d9ea26e800a060b4019b5697ff564.tar.bz2
* Better X drawing
-rwxr-xr-xtictactoe.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tictactoe.py b/tictactoe.py
index 747c598..9432fae 100755
--- a/tictactoe.py
+++ b/tictactoe.py
@@ -239,11 +239,11 @@ class gtkTicTacToe (gtk.DrawingArea):
cr.fill ()
cr.set_source_rgb (0, 0, 0)
if self._map[i][j] == PLAYER_ID:
- cr.move_to (cell_side * i + 5, cell_side * j + 5)
- cr.line_to (cell_side * (i + 1) - 5,
- cell_side * (j + 1) - 5)
- cr.move_to (cell_side * (i + 1) - 5, cell_side * j + 5)
- cr.line_to (cell_side * i + 5, cell_side * (j + 1) - 5)
+ cr.move_to (cell_side * (i + 0.1), cell_side * (j + 0.1))
+ cr.line_to (cell_side * (i + 0.9),
+ cell_side * (j + 0.9))
+ cr.move_to (cell_side * (i + 0.9), cell_side * (j + 0.1))
+ cr.line_to (cell_side * (i + 0.1), cell_side * (j + 0.9))
cr.stroke ()
else:
cr.arc (cell_side * (i + 0.5),