Permalink
Browse files

RED add top-row-win check

  • Loading branch information...
matatk committed Jul 17, 2014
1 parent 228aa4b commit 63c0795942088d391cd39bf0d3d64c37b433eee3
Showing with 5 additions and 0 deletions.
  1. +5 −0 nac.py
View
5 nac.py
@@ -25,6 +25,11 @@ def test_not_draw():
nac.moves_played_so_far = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
assert nac.is_draw() is False
def test_top_row_filled_is_win():
nac = NaughtsAndCrosses()
nac.moves_played_so_far = [ 0, 7, 1, 8, 2 ]
assert not set([0, 1, 2]).issubset(set(nac.moves_played_so_far[0::2]))
class NaughtsAndCrosses:
def __init__(self):

0 comments on commit 63c0795

Please sign in to comment.