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

Class to create ranges of numbers. More...

Inheritance diagram for host.labyrinth.Range:
host.labyrinth.ShuffledRange

Protected Attributes

protected data types
ArrayList< Integer > numbers
 handle to range More...
 

Package Functions

 Range (int begin, int end)
 Create the range [begin, end) More...
 
 Range (int begin, int end, int step)
 Create the range [begin, end) using step as interval between items. More...
 
int get ()
 Extract and return the first item from the range. More...
 

Private Member Functions

void init (int begin, int end, int step)
 Common utility to create the range for all constructors. More...
 

Detailed Description

Class to create ranges of numbers.

Definition at line 164 of file Common.java.

Constructor & Destructor Documentation

◆ Range() [1/2]

host.labyrinth.Range.Range ( int  begin,
int  end 
)
package

Create the range [begin, end)

Parameters
beginThe first item on the range
endThe item after the last on the range

Definition at line 170 of file Common.java.

◆ Range() [2/2]

host.labyrinth.Range.Range ( int  begin,
int  end,
int  step 
)
package

Create the range [begin, end) using step as interval between items.

Parameters
beginThe first item on the range
endThe item after the last on the range
stepThe interval between items

Definition at line 180 of file Common.java.

Member Function Documentation

◆ get()

int host.labyrinth.Range.get ( )
package

Extract and return the first item from the range.

Returns
The first item of the range or Const.noTileId if there is none.

Definition at line 197 of file Common.java.

◆ init()

void host.labyrinth.Range.init ( int  begin,
int  end,
int  step 
)
private

Common utility to create the range for all constructors.

Definition at line 188 of file Common.java.

Member Data Documentation

◆ numbers

ArrayList<Integer> host.labyrinth.Range.numbers
protected

handle to range

Definition at line 205 of file Common.java.


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