NetDragons.com
Name
Password
Save Password?

Class HighScores


[ Source | Index | Back to Nelzan ]

public class HighScores
extends Object
public class HighScores
extends Object
HighScores - Calls a CGI Script that handles new high scores and returns Data to be displayed.

Sends a request to /cgi-bin/high.pl?file=$file&name=$name&s=$score&key=$key where $file = getParameter("file"), $name = getParamter("name"), $s = your score, and $key = a static variable.


Variable Index

 o comp
Instance of Applet for callbacks.
 o dataFile
URL we are going to connecte to, saved here in case we need to recover.
 o font
 o fontSize
 o highScore
String Array to hold the top 5 high scores
 o instrcut
String Array to hold information on how to play the game.
 o key

Constructor Index

 o HighScores(Applet)
Creates and instance of HighScores.

Method Index

 o paint(Graphics)
Paints the data stored in highScore[].
 o paintInstructions(Graphics)
Paints the data stored in instrcut[].
 o sendHigh(int)
Opens a CGI script with the propper data and downloads the new high scores.

Variables

 o key
 private static final String key
 o instrcut
 String instrcut[]
String Array to hold information on how to play the game.

 o highScore
 String highScore[]
String Array to hold the top 5 high scores

 o comp
 Applet comp
Instance of Applet for callbacks.

 o dataFile
 URL dataFile
URL we are going to connecte to, saved here in case we need to recover.

 o font
 Font font
 o fontSize
 FontMetrics fontSize

Constructors

 o HighScores
 HighScores(Applet c)
Creates and instance of HighScores.

Parameters:
c - Instance of an Applet, for call backs.

Methods

 o sendHigh
 public void sendHigh(int s)
Opens a CGI script with the propper data and downloads the new high scores.

Sends a request to /cgi-bin/high.pl?file=$file&name=$name&s=$score&key=$key where $file = getParameter("file"), $name = getParamter("name"), $s = your score, and $key = a static variable.

Parameters:
s - Your Score.
 o paint
 public void paint(Graphics g)
Paints the data stored in highScore[].

Parameters:
g - The Graphics to draw to.
 o paintInstructions
 public void paintInstructions(Graphics g)
Paints the data stored in instrcut[].

Parameters:
g - The Graphics to draw to.
Copyright © 1997-2010 by NetDragons.com. All Rights Reserved.