public class ArenaQueue
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ArenaQueue.QueueMember |
Modifier and Type | Field and Description |
---|---|
protected int |
arenaCategory |
protected int |
arenaDifficulty |
protected java.lang.String |
arenaName |
protected int |
arenaType |
protected int |
groupInQueue |
protected atavism.agis.objects.ArenaQueue.QueueTeam[] |
groupteams |
protected int |
numTeams |
protected int |
playersInQueue |
protected boolean |
raceSpecific |
protected java.util.ArrayList<atavism.agis.objects.ArenaQueue.QueueTeam> |
teams |
Constructor and Description |
---|
ArenaQueue(int numTeams,
boolean raceSpecific,
java.util.ArrayList<java.lang.String>[] teamRaces,
int[] sizeReqs,
int arenaType,
java.lang.String arenaName,
int category,
int difficulty)
ArenaQueue Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addGroup(java.util.LinkedList<OID> members,
java.util.LinkedList<java.lang.String> membersName)
Adds the player to the queue.
|
boolean |
addPlayer(OID oid,
java.lang.String name)
Adds the player to the queue.
|
int |
getArenaCategory() |
int |
getArenaDifficulty() |
java.lang.String |
getArenaName() |
int |
getArenaType() |
int |
getNumPlayersInQueue() |
java.util.ArrayList<ArenaQueue.QueueMember>[] |
getPlayersQueued() |
boolean |
isPlayerInQueue(OID oid)
Searches through the arena queue to see if the player is already in it.
|
boolean |
isQueueReady()
Checks to see if there enough players queued to start a new arena.
|
void |
removePlayer(OID oid)
Removes the player from the queue.
|
void |
setArenaCategory(int arenaCategory) |
void |
setArenaDifficulty(int arenaDifficulty) |
void |
setArenaName(java.lang.String arenaName) |
void |
setArenaType(int arenaType) |
protected int numTeams
protected int playersInQueue
protected int groupInQueue
protected boolean raceSpecific
protected java.util.ArrayList<atavism.agis.objects.ArenaQueue.QueueTeam> teams
protected atavism.agis.objects.ArenaQueue.QueueTeam[] groupteams
protected int arenaType
protected int arenaCategory
protected java.lang.String arenaName
protected int arenaDifficulty
public ArenaQueue(int numTeams, boolean raceSpecific, java.util.ArrayList<java.lang.String>[] teamRaces, int[] sizeReqs, int arenaType, java.lang.String arenaName, int category, int difficulty)
numTeams:
- the number of teams in this queueraceSpecific:
- whether or not the teams require certain racesteamRaces:
- an array of ArrayLists which list which races can queue for which teamsizeReqs:
- an array indicating how many players need to be queued for each
team for a new arena to beginarenaName:
- the name of the arena template this queue is forpublic boolean addPlayer(OID oid, java.lang.String name)
oid:
- the oid of the player being added to the queuepublic boolean addGroup(java.util.LinkedList<OID> members, java.util.LinkedList<java.lang.String> membersName)
oid:
- the oid of the player being added to the queuepublic void removePlayer(OID oid)
oid:
- the oid of the player being removed from the queuepublic boolean isPlayerInQueue(OID oid)
oid:
- the oid to check the queue forpublic boolean isQueueReady()
public int getNumPlayersInQueue()
public java.util.ArrayList<ArenaQueue.QueueMember>[] getPlayersQueued()
public int getArenaType()
public void setArenaType(int arenaType)
public java.lang.String getArenaName()
public void setArenaName(java.lang.String arenaName)
public int getArenaCategory()
public void setArenaCategory(int arenaCategory)
public int getArenaDifficulty()
public void setArenaDifficulty(int arenaDifficulty)