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

Helper C++-like enumerator class to hold direction. More...

Static Package Functions

static int opposite (int direction)
 Utility to get the opposite direction. More...
 
static int get (int fromId, int toId)
 

Static Package Attributes

static final int UP =1
 North direction. More...
 
static final int RIGHT =3
 East direction. More...
 
static final int DOWN =5
 South direction. More...
 
static final int LEFT =7
 West direction. More...
 
static final int NONE =8
 No direction. More...
 

Detailed Description

Helper C++-like enumerator class to hold direction.

Definition at line 73 of file Common.java.

Member Function Documentation

◆ get()

static int host.labyrinth.Direction.get ( int  fromId,
int  toId 
)
staticpackage

Definition at line 89 of file Common.java.

◆ opposite()

static int host.labyrinth.Direction.opposite ( int  direction)
staticpackage

Utility to get the opposite direction.

Parameters
directionInput direction
Returns
The opposite direction

Definition at line 85 of file Common.java.

Member Data Documentation

◆ DOWN

final int host.labyrinth.Direction.DOWN =5
staticpackage

South direction.

Definition at line 76 of file Common.java.

◆ LEFT

final int host.labyrinth.Direction.LEFT =7
staticpackage

West direction.

Definition at line 77 of file Common.java.

◆ NONE

final int host.labyrinth.Direction.NONE =8
staticpackage

No direction.

Definition at line 78 of file Common.java.

◆ RIGHT

final int host.labyrinth.Direction.RIGHT =3
staticpackage

East direction.

Definition at line 75 of file Common.java.

◆ UP

final int host.labyrinth.Direction.UP =1
staticpackage

North direction.

Definition at line 74 of file Common.java.


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