public class Game
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
Game.TimeListener
Action Listener Class for timer1 slow
|
private class |
Game.TimeListener2
Action Listener Class for timer2 fast
|
Modifier and Type | Field and Description |
---|---|
protected Level |
level |
(package private) static LevelPanel |
levelPanel |
protected java.util.ArrayList<Monster> |
monsters |
protected Player |
player |
protected char[][] |
rep1 |
protected char[][] |
rep2 |
protected javax.swing.JLabel |
score |
protected javax.swing.JLabel |
status |
protected javax.swing.Timer |
t1 |
protected javax.swing.Timer |
t2 |
Constructor and Description |
---|
Game()
Constructor for class Game.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.JLabel |
getScore()
Getter for score
|
javax.swing.JLabel |
getStatus()
Getter for status
|
void |
lose()
Lose Method: Check to see if player is out of lives
|
static void |
main(java.lang.String[] args)
Main Program under Game class
|
void |
setScore(java.lang.String s)
Setter for score
|
void |
setStatus(java.lang.String s)
Setter for status
|
void |
win()
Win method: Checks to see if the level is finished or the player has won
|
static LevelPanel levelPanel
protected Level level
protected Player player
protected java.util.ArrayList<Monster> monsters
protected javax.swing.JLabel score
protected javax.swing.JLabel status
protected char[][] rep1
protected char[][] rep2
protected javax.swing.Timer t1
protected javax.swing.Timer t2
public Game()
public void win()
public void lose()
public static void main(java.lang.String[] args)
args
- Command line argumentspublic javax.swing.JLabel getScore()
public void setScore(java.lang.String s)
s
- string to be set as JLabelpublic javax.swing.JLabel getStatus()
public void setStatus(java.lang.String s)
s
- string to be set as JLabel