| Package | Description |
|---|---|
| com.sun.sgs.example.hack.server | |
| com.sun.sgs.example.hack.server.ai | |
| com.sun.sgs.example.hack.server.level |
| Modifier and Type | Class and Description |
|---|---|
class |
BasicCharacterManager
This abstract implementation of
CharacterManager provides
some of the common functionality for all managers, and is extended by
the managers for players and AIs. |
class |
PlayerCharacterManager
This is an implementation of
CharacterManager used to manage
PlayerCharacters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
GameConnector.enteredConnection(CharacterManager mgr)
Transitions the given character to the game if they're in the
level, and to the level if they're in the game.
|
LevelBoard.ActionResult |
Item.giveTo(CharacterManager characterManager)
Called when this
Item is being given to the character. |
LevelBoard.ActionResult |
SimpleItem.giveTo(CharacterManager characterManager)
Called when this
Item is being given to the character. |
| Modifier and Type | Class and Description |
|---|---|
class |
AICharacterManager
This implementation of CharacterManager is used for all AI creatures.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Level.addCharacter(CharacterManager mgr)
Adds a character to this level at some random point.
|
boolean |
BasicTile.addCharacter(CharacterManager mgr)
Adds the given character to this tile if possible.
|
boolean |
ConnectorTile.addCharacter(CharacterManager mgr)
Adds the given character to this tile if possible.
|
boolean |
Tile.addCharacter(CharacterManager mgr)
Adds the given character to this tile if possible.
|
void |
SimpleLevel.addCharacter(CharacterManager mgr)
Adds a character to this level at some random point.
|
boolean |
Level.addCharacter(CharacterManager mgr,
int startX,
int startY)
Adds a character to this level at the given location.
|
boolean |
SimpleLevel.addCharacter(CharacterManager mgr,
int startX,
int startY)
Adds a character to this level at the given location.
|
boolean |
SimpleBoard.addCharacterAt(int x,
int y,
CharacterManager mgr)
Tries to add a character at the given location.
|
boolean |
LevelBoard.addCharacterAt(int x,
int y,
CharacterManager mgr)
Tries to add a character at the given location.
|
boolean |
BasicTile.canOccupy(CharacterManager mgr)
Checks if the there is anything currently occupying this tile that
would keep the character from occupying it.
|
boolean |
ConnectorTile.canOccupy(CharacterManager mgr)
Always returns true, because connection points are, by definition,
spaces you can occupy.
|
boolean |
Tile.canOccupy(CharacterManager mgr)
Returns whether or not this tile, in its current state, can be
occupied by the given character.
|
protected LevelBoard.ActionResult |
BasicTile.charMoveTo(CharacterManager characterManager)
Test to move the given character to this tile.
|
boolean |
SimpleConnector.enteredConnection(CharacterManager mgr)
Transitions the given character to the other point connected to
their current location.
|
boolean |
OneWayConnector.enteredConnection(CharacterManager mgr)
Transitions the given character to the target point.
|
boolean |
Connector.enteredConnection(CharacterManager mgr)
Transitions the given character from one point to another.
|
boolean |
PlayerConnector.enteredConnection(CharacterManager mgr)
Transitions the given character to the other point connected to
their current location, checking first that this character belongs
to a player.
|
LevelBoard.ActionResult |
BasicTile.getItem(CharacterManager characterManager)
Tries to take an item on this tile.
|
LevelBoard.ActionResult |
ConnectorTile.getItem(CharacterManager characterManager)
This always fails, since no items are allowed on this tile.
|
LevelBoard.ActionResult |
Tile.getItem(CharacterManager characterManager)
Tries to take an item on this tile.
|
LevelBoard.ActionResult |
SimpleBoard.getItem(int x,
int y,
CharacterManager mgr)
Tries to take an item on this tile.
|
LevelBoard.ActionResult |
LevelBoard.getItem(int x,
int y,
CharacterManager mgr)
Gets the items available at the given location.
|
protected void |
SimpleConnector.handleEntered(CharacterManager mgr)
Figures out which end to send the character to, based on which end
they're on right now, and moves the character.
|
boolean |
ImpassableTile.isPassable(CharacterManager mgr)
Typically returns false, since this space is always impassable.
|
boolean |
PassableTile.isPassable(CharacterManager mgr)
Always returns true, since this space is always passable.
|
boolean |
ConnectorTile.isPassable(CharacterManager mgr)
Always returns true, because connection points are, by definition,
passable.
|
boolean |
Tile.isPassable(CharacterManager mgr)
Returns whether or not this space could be entered by the given
character.
|
boolean |
Level.move(CharacterManager mgr,
KeyMessages.Type direction)
Tries to move the given character in the given direction
|
boolean |
SimpleLevel.move(CharacterManager mgr,
KeyMessages.Type direction)
Tries to move the given character in the given direction
|
LevelBoard.ActionResult |
ImpassableTile.moveTo(CharacterManager characterManager)
Test to move the given character onto this tile.
|
LevelBoard.ActionResult |
PassableTile.moveTo(CharacterManager mgr)
Test to move the given character onto this tile.
|
LevelBoard.ActionResult |
ConnectorTile.moveTo(CharacterManager characterManager)
Test to move the given character to this tile.
|
LevelBoard.ActionResult |
Tile.moveTo(CharacterManager characterManager)
Test to move the given character to this tile.
|
LevelBoard.ActionResult |
SimpleBoard.moveTo(int x,
int y,
CharacterManager mgr)
Moves the given character to the given location.
|
LevelBoard.ActionResult |
LevelBoard.moveTo(int x,
int y,
CharacterManager mgr)
Moves the given character to the given location.
|
void |
Level.removeCharacter(CharacterManager mgr)
Removes a character from the level.
|
boolean |
BasicTile.removeCharacter(CharacterManager mgr)
Removes the given character from this tile, if and only if this
character is already on this tile.
|
boolean |
ConnectorTile.removeCharacter(CharacterManager mgr)
Removes the given character from this tile, if and only if this
character is already on this tile.
|
boolean |
Tile.removeCharacter(CharacterManager mgrRef)
Removes the given character from this tile, if and only if this
character is already on this tile.
|
void |
SimpleLevel.removeCharacter(CharacterManager mgr)
Removes a character from the level.
|
boolean |
SimpleBoard.removeCharacterAt(int x,
int y,
CharacterManager mgr)
Tries to remove a character from the given location.
|
boolean |
LevelBoard.removeCharacterAt(int x,
int y,
CharacterManager mgr)
Tries to remove a character from the given location.
|
boolean |
Level.take(CharacterManager mgr)
Tries to take items at the character's current location.
|
boolean |
SimpleLevel.take(CharacterManager mgr)
Tries to take items at the character's current location.
|
boolean |
SimpleBoard.testMove(int x,
int y,
CharacterManager mgr)
Tests to see if a move would be possible to the given location for
the given character.
|
boolean |
LevelBoard.testMove(int x,
int y,
CharacterManager mgr)
Tests to see if a move would be possible to the given location for
the given character.
|
Copyright © 2013. All Rights Reserved.