FileDocCategorySizeDatePackage
Roster.javaAPI DocExample832Tue Dec 12 18:58:40 GMT 2000bingo.game

Roster

public class Roster extends Object

Fields Summary
private Vector
roster
private int
nextPlayerID
Constructors Summary
Roster()


     
	roster = new Vector();
    
Methods Summary
voidaddElement(bingo.shared.PlayerRecord p, RingMaster ringMaster)

	roster.addElement(p);

        if (roster.size() == 1)
            ringMaster.startCountDown();

	ringMaster.sendPlayerStatusMessage(p);
    
intnextPlayerID()

	return ++nextPlayerID;
    
voidremoveAllElements()

	roster.removeAllElements();
	nextPlayerID = 0;
    
bingo.shared.PlayerRecordsearchForPlayerWithID(int ID)

	int size = roster.size();

	for (int i = 0; i < size; i ++) {
	    PlayerRecord pl = (PlayerRecord)(roster.elementAt(i));
	    if (pl.ID == ID)
		return pl;
	}

	return null;
    
intsize()

	return roster.size();