You need to sign in or sign up before continuing.
Newer
Older
## @file ScoreDisplay.py
# @author Vaibhav Chadha
# @brief implements the interface after the snake dies
# @date 11/22/2018
import pygame, sys
def storeScore(score):
prevScore = int(highscore.HighScore.findHighScore())
#print(prevScore)
if(score > prevScore):
infile = open("highscore.txt", "w")
infile.write(str(score))
else: return
lightBlue = [89,131,145]
darkgray = [100,100,100]
white = [255,255,255]
image1 = pygame.image.load("Images/Exit_image.png")
## roboto_font = pygame.font.Font("Roboto-Black.ttf", 35)
mousepos = pygame.mouse.get_pos() #checking mouse position
mouseclick = pygame.mouse.get_pressed()#checking mouse pressed
highscore.HighScore.custom_text('Your Score is ' + str(score),"Roboto-Light.ttf", 40,[0, 0, 0],(93,50),lastPage)
highscore.HighScore.button(lastPage,darkgray, [150,150,200,60], 0)
highscore.HighScore.button(lastPage,lightBlue, [150,150,200,60], 0)
highscore.HighScore.custom_text('Play Again',"Roboto-Light.ttf", 25, white,(193,165),lastPage)
highscore.HighScore.button(lastPage,darkgray, [150,260,200,60], 0)
highscore.HighScore.button(lastPage,lightBlue, [150,260,200,60], 0)
highscore.HighScore.custom_text('Main Menu',"Roboto-Light.ttf", 25,white,(189,275),lastPage)
highscore.HighScore.button(lastPage,darkgray, [150,370,200,60], 0)
highscore.HighScore.button(lastPage,lightBlue, [150,370,200,60], 0)
highscore.HighScore.custom_text('Quit',"Roboto-Light.ttf", 25,white,(225,385),lastPage)