Labyrinth
A labyrinth game assignment
host.labyrinth.Game Class Reference

Main application class. More...

Static Public Member Functions

static void main (String[] args)
 Main game loop. More...
 

Package Functions

 Game ()
 < An empty constructor More...
 
Player main application interface
int round ()
 Utility to get current round of the game. More...
 
int nextRound ()
 Utility to increase and get the increased round of the game. More...
 
void waitUser ()
 Utility to hold the execution of the program waiting for user input. More...
 
Accessor/Mutator interface
Note
Please consider not to use mutator interface. Its the abstraction killer :( We have added a bit of logic however, in order to make it a bit more safe.
int getRound ()
 
void setRound (int round)
 

Static Package Functions

static boolean getArguments (String[] args)
 Command line argument handler. More...
 

Private Attributes

Game's data
int round
 Holds the round of the game. More...
 
Scanner scan
 Input handle used in interactive mode. More...
 

Detailed Description

Main application class.

This class is the only public interface of the entire game.

Definition at line 49 of file Game.java.

Constructor & Destructor Documentation

◆ Game()

host.labyrinth.Game.Game ( )
package

< An empty constructor

Definition at line 52 of file Game.java.

Member Function Documentation

◆ getArguments()

static boolean host.labyrinth.Game.getArguments ( String []  args)
staticpackage

Command line argument handler.

Definition at line 95 of file Game.java.

◆ getRound()

int host.labyrinth.Game.getRound ( )
package

Definition at line 82 of file Game.java.

◆ main()

static void host.labyrinth.Game.main ( String []  args)
static

Main game loop.

Definition at line 151 of file Game.java.

◆ nextRound()

int host.labyrinth.Game.nextRound ( )
package

Utility to increase and get the increased round of the game.

Definition at line 61 of file Game.java.

◆ round()

int host.labyrinth.Game.round ( )
package

Utility to get current round of the game.

Definition at line 59 of file Game.java.

◆ setRound()

void host.labyrinth.Game.setRound ( int  round)
package

Definition at line 83 of file Game.java.

◆ waitUser()

void host.labyrinth.Game.waitUser ( )
package

Utility to hold the execution of the program waiting for user input.

This is true only if the user passed the interactive flag.

Definition at line 67 of file Game.java.

Member Data Documentation

◆ round

int host.labyrinth.Game.round
private

Holds the round of the game.

Definition at line 88 of file Game.java.

◆ scan

Scanner host.labyrinth.Game.scan
private

Input handle used in interactive mode.

Definition at line 89 of file Game.java.


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