Advertisement
xdrasz

shitty-tictactoe

May 24th, 2022
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.04 KB | None | 0 0
  1. x1=1
  2. x2=2
  3. x3=3
  4. x4=4
  5. x5=5
  6. x6=6
  7. x7=7
  8. x8=8
  9. x9=9
  10. a=0
  11. print(x1,"!",x2,"!",x3)
  12. print("---------")
  13. print(x4,"!",x5,"!",x6)
  14. print("---------")
  15. print(x7,"!",x8,"!",x9)
  16. while a < 9:
  17.     print("o move")
  18.     y = input()
  19.     if y == "1":x1="O"
  20.     if y=="2":x2="O"
  21.     if y=="3":x3="O"
  22.     if y=="4":x4="O"
  23.     if y=="5":x5="O"
  24.     if y=="6":x6="O"
  25.     if y=="7":x7="O"
  26.     if y=="8":x8="O"
  27.     if y=="9":x9="O"
  28.     print(x1,"!",x2,"!",x3)
  29.     print("---------")
  30.     print(x4,"!",x5,"!",x6)
  31.     print("---------")
  32.     print(x7,"!",x8,"!",x9)
  33.     a=a+1
  34.     if a<9:
  35.         print("x  move")
  36.         c = input()
  37.         if c == "1":x1="X"
  38.         if c=="2":x2="X"
  39.         if c=="3":x3="X"
  40.         if c=="4":x4="X"
  41.         if c=="5":x5="X"
  42.         if c=="6":x6="X"
  43.         if c=="7":x7="X"
  44.         if c=="8":x8="X"
  45.         if c=="9":x9="X"
  46.         print(x1,"!",x2,"!",x3)
  47.         print("---------")
  48.         print(x4,"!",x5,"!",x6)
  49.         print("---------")
  50.         print(x7,"!",x8,"!",x9)
  51.         a=a+1
  52. print("gg a celui qui a gagne")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement