Skip to content
Snippets Groups Projects
Commit 170094ae authored by Hameed Andy's avatar Hameed Andy
Browse files
parents e5af3971 91440a2a
No related branches found
No related tags found
No related merge requests found
#importing necessary libraries
import pygame, sys
import highscore
class GUI():
#a function made to execute other files from the system
def runfile(runfilename):
......@@ -49,8 +49,8 @@ def main():
if ( 10 <= mousepos[0] <= 310 and 550 <= mousepos[1] <= 550 +55):
GUI.button(game,[200,0,0],[10,550,300,55], 0)
if mouseclick[0] == 1:
GUI.runfile('highscore.py')
#highscore.main()
#GUI.runfile('highscore.py')
highscore.main()
else:
GUI.button(game,[180,180,180], [10,550,300,55], 0)
GUI.text('HIGHEST SCORE',"comicsansms", 35,(0, 0, 0),(10,550),game)
......@@ -67,7 +67,8 @@ def main():
pygame.display.update()
main()
if __name__ == "__main__":
main()
import pygame, sys
from tkinter import *
import Snake_Game
class HighScore():
def runfile(runfilename):
......@@ -38,7 +38,8 @@ def main():
HighScore.text('Main Menu',"times", 25,red,(90,70),highscore)
if (90 <= mousepos[0] <= 90+120 and 70 <= mousepos[1] <= 70+27 ):
if mouseclick[0] == 1:
HighScore.runfile('Snake_Game.py')
#HighScore.runfile('Snake_Game.py')
Snake_Game.main()
HighScore.button(highscore,[0,0,0], [125,105,45,27], 0)
HighScore.text('Quit',"times", 25,red,(125,105),highscore)
......@@ -49,4 +50,4 @@ def main():
pygame.display.update()
main()
#main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment