Rabbit Escape  2017-01-14_18:33:47_+0000__(tag:_v0.10.1)
All Classes Namespaces Files Functions Variables Enumerator Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
rabbitescape.engine.solution.SandboxGame Class Reference
Collaboration diagram for rabbitescape.engine.solution.SandboxGame:
Collaboration graph
[legend]

Public Member Functions

 SandboxGame (World world)
 
Token.Type getSelectedType ()
 
void setSelectedType (Token.Type selectedType)
 
World getWorld ()
 

Private Member Functions

List< ThingmakeClonedThings (List< Thing > things)
 
List< RabbitmakeClonedRabbits (List< Rabbit > rabbits)
 
Rabbit cloneRabbit (Rabbit rabbit)
 

Private Attributes

Token.Type selectedType = null
 
final World world
 

Detailed Description

A completely sandboxed game that can be edited and have solutions run against without affecting the real game.

Constructor & Destructor Documentation

rabbitescape.engine.solution.SandboxGame.SandboxGame ( World  world)

Create a sandbox game based on a given world. This allows playing with the sandbox game without affecting the world in any way.

Parameters
worldThe world to copy.

Member Function Documentation

Rabbit rabbitescape.engine.solution.SandboxGame.cloneRabbit ( Rabbit  rabbit)
private

Clone a single rabbit.

Parameters
rabbitThe rabbit to be cloned.
Returns
The cloned rabbit.
Token.Type rabbitescape.engine.solution.SandboxGame.getSelectedType ( )

Get the currently selected token type.

Returns
The token type selected.
World rabbitescape.engine.solution.SandboxGame.getWorld ( )

Get the current world.

Returns
The sandboxed world.
List<Rabbit> rabbitescape.engine.solution.SandboxGame.makeClonedRabbits ( List< Rabbit rabbits)
private

Make a clone of a list of rabbits.

Parameters
rabbitsThe list of rabbits to clone.
Returns
The cloned list.
List<Thing> rabbitescape.engine.solution.SandboxGame.makeClonedThings ( List< Thing things)
private

Create a clone of the list of a given list of things.

Parameters
thingsThe things to clone.
Returns
The cloned list of things.
void rabbitescape.engine.solution.SandboxGame.setSelectedType ( Token.Type  selectedType)

Select a token type to place next.

Parameters
selectedTypeThe type to select.

Member Data Documentation

Token.Type rabbitescape.engine.solution.SandboxGame.selectedType = null
private

The token type that is currently 'selected' by whatever is interacting with the sandbox.

final World rabbitescape.engine.solution.SandboxGame.world
private

The world object that is contained in the game.


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