Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. # Trent
  2. # 19/06/2019
  3. # Noughts and Crosses Game
  4. # STEPS:
  5. # 1 - Create board
  6. # 2 - Display board
  7. # 3 - Ask user to pick spot
  8. # 4 -
  9. # 5 -
  10. # ♣♦
  11. #if choose == "G" or choose == "g":
  12. # print(player)
  13. # print(bot)
  14. # print(border)
  15. # print(border2)
  16. # input("What would you like to do?\n[P] Change Player Icon\n[B] Change Bot Icon\n[B] Change Border Icon\n[S] Change Seperator Icon\n[R] Return\n:>")
  17.  
  18. #vars
  19. import random
  20. selectedgrid = 0 # ignore pls
  21. player = "♣"
  22. bot = "♦"
  23. winner = "false"
  24.  
  25. # Step 1: Create the board
  26. # T1 T2 T3 M1 M2 M3 B1 B2 B3
  27. board = [["1", "2", "3"],["4", "5", "6"],["7", "8", "9"]]
  28.  
  29.  
  30. print(*board[0], sep = " # ")
  31. print("#########")
  32. print(*board[1], sep = " # ")
  33. print("#########")
  34. print(*board[2], sep = " # ")
  35.  
  36. # Step 2: Display the board
  37. print(*board[0], sep = " # ")
  38. print("#########")
  39. print(*board[1], sep = " # ")
  40. print("#########")
  41. print(*board[2], sep = " # ")
  42.  
  43. # Step 3: whatever step 3 was
  44. choose = input("What do you want to do?\n[M] - Move\n[O] - Options\n[Q] - Quit\n[")
  45.  
  46. if choose == "M" or choose == "m":
  47. print(*board[0], sep = " # ")
  48. print("#########")
  49. print(*board[1], sep = " # ")
  50. print("#########")
  51. print(*board[2], sep = " # ")
  52. while winner == "false":
  53. posx = input("Enter the x number of where you want to move")
  54. posy = input("Enter the y number of where you want to move")
  55. posx = posx + 1
  56. posy = posy + 1
  57. board[posx][posy] = player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement