Snake
|
A Class that will contain useful functions in order for the creation of highscore page. More...
Public Member Functions | |
def | runfile (runfilename) |
A function for running other files. More... | |
def | text (text, fontStyle, fontSize, color, coord, surface) |
A method to display text. More... | |
def | button (Surface, color, Rect, width) |
A method to create a button. More... | |
def | findHighscore () |
Finds the highest score from the file. More... | |
A Class that will contain useful functions in order for the creation of highscore page.
def highscore.HighScore.button | ( | Surface, | |
color, | |||
Rect, | |||
width | |||
) |
A method to create a button.
This method will make a box on the interface
surface | The background (surface) the box should be made on |
color | The color of the button to be made |
Rect | The coordinate of the button with the length and width |
width | The width of the sides of button |
def highscore.HighScore.findHighscore | ( | ) |
Finds the highest score from the file.
This writes the input from the file in an array and find the max number from it
def highscore.HighScore.runfile | ( | runfilename | ) |
A function for running other files.
Executes another python file when this is selected, Given that the file is in same folder.
runfilename | The name of the file to be executed |
def highscore.HighScore.text | ( | text, | |
fontStyle, | |||
fontSize, | |||
color, | |||
coord, | |||
surface | |||
) |
A method to display text.
This function will print the text on the interface
text | The text to be printed |
fontStyle | The font Style of the text to be displayed |
fontSize | The size of the text written |
color | The color of the text |
coord | The coordinate at which the text should start displaying |
surface | The background (surface) the text should be printed on |