Snake
Public Member Functions | List of all members
highscore.HighScore Class Reference

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...
 

Detailed Description

A Class that will contain useful functions in order for the creation of highscore page.

Member Function Documentation

def highscore.HighScore.button (   Surface,
  color,
  Rect,
  width 
)

A method to create a button.

This method will make a box on the interface

Parameters
surfaceThe background (surface) the box should be made on
colorThe color of the button to be made
RectThe coordinate of the button with the length and width
widthThe 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.

Parameters
runfilenameThe 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

Parameters
textThe text to be printed
fontStyleThe font Style of the text to be displayed
fontSizeThe size of the text written
colorThe color of the text
coordThe coordinate at which the text should start displaying
surfaceThe background (surface) the text should be printed on

The documentation for this class was generated from the following file: