Permalink
Browse files

REFACTOR possibly a bit aggressively wrt The Rules

  • Loading branch information...
matatk committed Jul 30, 2014
1 parent 541a453 commit b873939af49e97ec69eed930013de18e818affd0
Showing with 4 additions and 2 deletions.
  1. +4 −2 nac.py
View
6 nac.py
@@ -17,5 +17,7 @@ def test_complete_middle_row_is_win():
def is_win(moves):
top_row = set([0, 1, 2])
return set(moves).issuperset(top_row) \
or moves == [3, 4, 5]
middle_row = set([3, 4, 5])
wins = [top_row,
middle_row]
return any(set(moves).issuperset(win) for win in wins)

0 comments on commit b873939

Please sign in to comment.