Class Index | File Index

Classes


Class com.jiffeegames.Score

A Score object keeps track of the player's score, and it announces when the player has won the game.
Defined in: jiffee-score.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Create a Score object.
Method Summary
Method Attributes Method Name and Description
 
add(points)
Add points to the player's current score (or deduct points if the increment is negative).
<static>  
com.jiffeegames.Score.es()
Set the language to Spanish.
 
init(locate, language)
 
setMaximum(points)
Set the maximum number of points which the player can score, i.e.
 
Define what message should be displayed when the player wins the game.
<private>  
showScore_(current, max)
Display the current score to the user.
Class Detail
com.jiffeegames.Score()
Create a Score object. The normal call is
var score = com.jiffeegames.Score();
Method Detail
{void} add(points)
Add points to the player's current score (or deduct points if the increment is negative). The player's score must stay between zero and the maximum at all times.
Parameters:
{Integer} points
- The number of points to add to the score.

<static> {void} com.jiffeegames.Score.es()
Set the language to Spanish.

init(locate, language)
Parameters:
locate
language

setMaximum(points)
Set the maximum number of points which the player can score, i.e. the number required to win the game.
Parameters:
{Integer} points
The number of points needed to win the game.

{void} setWinningMessage(message)
Define what message should be displayed when the player wins the game.
Parameters:
{String} message
The message to be displayed.

<private> {void} showScore_(current, max)
Display the current score to the user.
Parameters:
{Integer} current
The player's current score.
{Integer} max
The maximum possible (i.e. winning) score.

Documentation generated by JsDoc Toolkit 2.3.2 on Sun Jul 25 2010 13:49:31 GMT-0700 (PDT)