Advertisement
Enrro

tictactoe 111133

Nov 7th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. '''
  2. Created on 11/11/2014
  3. tictactoe
  4. Proven and tested on python 3.3.3
  5. @author: A01221672
  6. '''
  7. board = [["e","e","e"],["e","e","e"],["e","e","e"]]
  8. winCon = [["x","x","e"],["x","e","x"],["e","x","x"]]
  9. win = False
  10. while not (win):
  11. print("Tic tac toe")
  12. re1 = int(input("heigh input: "))
  13. re2 = int(input("width input: "))
  14.  
  15. if board[re1][re2] != "o":
  16. board[re1][re2] = "x"
  17.  
  18. print(board)
  19. for x in board:
  20. for y in winCon:
  21. if y == x:
  22. print("YES")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement