Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.50 KB | None | 0 0
  1. from tkinter import *
  2. import winsound
  3.  
  4. om = False
  5.  
  6. def above():
  7. if om == True:
  8. om = False
  9.  
  10.  
  11. def below():
  12. if om == False:
  13. om = True
  14.  
  15. while om == True:
  16. winsound.PlaySound("aqua.wav", winsound.SND_ASYNC)
  17.  
  18.  
  19. # main window
  20. window = Tk()
  21. window.title("Aqua Gy")
  22. window.configure(background="white")
  23.  
  24. # Above Water row 1
  25. Button(window, text="ar0c0", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=0, stick=W)
  26. Button(window, text="ar0c1", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=1, stick=W)
  27. Button(window, text="ar0c2", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=2, stick=W)
  28. Button(window, text="ar0c3", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=3, stick=W)
  29. Button(window, text="ar0c4", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=4, stick=W)
  30. Button(window, text="ar0c5", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=5, stick=W)
  31. Button(window, text="ar0c6", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=6, stick=W)
  32. Button(window, text="ar0c7", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=7, stick=W)
  33. Button(window, text="ar0c8", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=8, stick=W)
  34. Button(window, text="ar0c9", width=5, height=2, bg="white", fg="white", command=above) .grid(row=0, column=9, stick=W)
  35. # Above Water row 2
  36. Button(window, text="ar1c0", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=0, stick=W)
  37. Button(window, text="ar1c1", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=1, stick=W)
  38. Button(window, text="ar1c2", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=2, stick=W)
  39. Button(window, text="ar1c3", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=3, stick=W)
  40. Button(window, text="ar1c4", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=4, stick=W)
  41. Button(window, text="ar1c5", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=5, stick=W)
  42. Button(window, text="ar1c6", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=6, stick=W)
  43. Button(window, text="ar1c7", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=7, stick=W)
  44. Button(window, text="ar1c8", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=8, stick=W)
  45. Button(window, text="ar1c9", width=5, height=2, bg="white", fg="white", command=above) .grid(row=1, column=9, stick=W)
  46.  
  47. # waterline label row 3
  48. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=0, sticky=W)
  49. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=1, sticky=W)
  50. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=2, sticky=W)
  51. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=3, sticky=W)
  52. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=4, sticky=W)
  53. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=5, sticky=W)
  54. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=6, sticky=W)
  55. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=7, sticky=W)
  56. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=8, sticky=W)
  57. Label(window, text="~~~~", bg="white", fg="blue", font="none 12 bold") .grid(row=2, column=9, sticky=W)
  58.  
  59. # Under Water Row 4
  60. Button(window, text="ur4c0", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=0, stick=W)
  61. Button(window, text="ur4c1", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=1, stick=W)
  62. Button(window, text="ur4c2", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=2, stick=W)
  63. Button(window, text="ur4c3", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=3, stick=W)
  64. Button(window, text="ur4c4", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=4, stick=W)
  65. Button(window, text="ur4c5", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=5, stick=W)
  66. Button(window, text="ur4c6", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=6, stick=W)
  67. Button(window, text="ur4c7", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=7, stick=W)
  68. Button(window, text="ur4c8", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=8, stick=W)
  69. Button(window, text="ur4c9", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=4, column=9, stick=W)
  70. # Under Water Row 5
  71. Button(window, text="ur5c0", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=0, stick=W)
  72. Button(window, text="ur5c1", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=1, stick=W)
  73. Button(window, text="ur5c2", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=2, stick=W)
  74. Button(window, text="ur5c3", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=3, stick=W)
  75. Button(window, text="ur5c4", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=4, stick=W)
  76. Button(window, text="ur5c5", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=5, stick=W)
  77. Button(window, text="ur5c6", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=6, stick=W)
  78. Button(window, text="ur5c7", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=7, stick=W)
  79. Button(window, text="ur5c8", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=8, stick=W)
  80. Button(window, text="ur5c9", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=5, column=9, stick=W)
  81. # Under Water Row 6
  82. Button(window, text="ur6c0", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=0, stick=W)
  83. Button(window, text="ur6c1", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=1, stick=W)
  84. Button(window, text="ur6c2", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=2, stick=W)
  85. Button(window, text="ur6c3", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=3, stick=W)
  86. Button(window, text="ur6c4", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=4, stick=W)
  87. Button(window, text="ur6c5", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=5, stick=W)
  88. Button(window, text="ur6c6", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=6, stick=W)
  89. Button(window, text="ur6c7", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=7, stick=W)
  90. Button(window, text="ur6c8", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=8, stick=W)
  91. Button(window, text="ur6c9", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=6, column=9, stick=W)
  92. # Under Water Row 7
  93. Button(window, text="ur7c0", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=0, stick=W)
  94. Button(window, text="ur7c1", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=1, stick=W)
  95. Button(window, text="ur7c2", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=2, stick=W)
  96. Button(window, text="ur7c3", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=3, stick=W)
  97. Button(window, text="ur7c4", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=4, stick=W)
  98. Button(window, text="ur7c5", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=5, stick=W)
  99. Button(window, text="ur7c6", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=6, stick=W)
  100. Button(window, text="ur7c7", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=7, stick=W)
  101. Button(window, text="ur7c8", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=8, stick=W)
  102. Button(window, text="ur7c9", width=5, height=2, bg="blue", fg="blue", command=below) .grid(row=7, column=9, stick=W)
  103.  
  104. # mainloop
  105. window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement