|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectserver.framework.models.AbstractPlayer
server.brickblock.fwimpl.BBPlayer
public class BBPlayer
BrickBlock's AbstractPlayer
implemention.
In addition to the attributes and functionality found
in AbstractPlayer
, this class contains
information about the player's strength. In addition,
this class offers
functionality for handling a player's bonuses in terms
of active Powerup
objects.
Constructor Summary | |
---|---|
BBPlayer(SocketWrapper socket,
AbstractServer server,
TestModule.TestType testtype)
Creates a BBPlayer object with the specified
attributes. |
Method Summary | |
---|---|
java.util.List<Powerup> |
getInactivePowerups()
Loops through the player's power up objects, and checks if any of the power ups have timed out. |
int |
getStrength()
Returns the player's strength. |
void |
pickUpPowerup(Powerup powerup)
Lets the player pick up a power up object, and sets the time for when this power up will be deactivated. |
void |
setStrength(int strength)
Sets the player's strength. |
Methods inherited from class server.framework.models.AbstractPlayer |
---|
compareTo, getAddress, getAttributeValues, getColor, getId, getName, getPosition, getPositionArray, getScore, getScreenResolution, getSessionId, getSize, getSocket, getSpeed, getTeam, increaseScore, lastAliveConfirmation, notifyAboutAlive, notifyAboutPlayerDisconnected, runTest, sendMessage, setAttributeValues, setName, setPosition, setPosition, setReady, setReady, setScore, setSessionId, setSize, setSpeed, setTeam, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BBPlayer(SocketWrapper socket, AbstractServer server, TestModule.TestType testtype)
BBPlayer
object with the specified
attributes. Calls the parent constructor and initialises
the power up list.
socket
- The player's SocketWrapper
object.server
- The server model.testtype
- The test type, if any.Method Detail |
---|
public int getStrength()
public void setStrength(int strength)
strength
- The player's strength.public void pickUpPowerup(Powerup powerup)
powerup
- The picked up power up.public java.util.List<Powerup> getInactivePowerups()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |