Labyrinth
A labyrinth game assignment
net.hoo2.auth.labyrinth.Range Class Reference

Class to create ranges of numbers. More...

Inheritance diagram for net.hoo2.auth.labyrinth.Range:
net.hoo2.auth.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 160 of file Common.java.

Constructor & Destructor Documentation

◆ Range() [1/2]

net.hoo2.auth.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 166 of file Common.java.

◆ Range() [2/2]

net.hoo2.auth.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 176 of file Common.java.

Member Function Documentation

◆ get()

int net.hoo2.auth.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 193 of file Common.java.

◆ init()

void net.hoo2.auth.labyrinth.Range.init ( int  begin,
int  end,
int  step 
)
private

Common utility to create the range for all constructors.

Definition at line 184 of file Common.java.

Member Data Documentation

◆ numbers

ArrayList<Integer> net.hoo2.auth.labyrinth.Range.numbers
protected

handle to range

Definition at line 201 of file Common.java.


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