Made the clearOccupant methods maximally overrideable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3457 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -203,8 +203,7 @@ public class Table
|
||||
{
|
||||
for (int i = 0; i < occupants.length; i++) {
|
||||
if (username.equals(occupants[i])) {
|
||||
occupants[i] = null;
|
||||
bodyOids[i] = 0;
|
||||
clearOccupantPos(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -223,14 +222,23 @@ public class Table
|
||||
{
|
||||
for (int i = 0; i < bodyOids.length; i++) {
|
||||
if (bodyOid == bodyOids[i]) {
|
||||
occupants[i] = null;
|
||||
bodyOids[i] = 0;
|
||||
clearOccupantPos(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal method used for clearing an occupant once we've located
|
||||
* the right position.
|
||||
*/
|
||||
protected void clearOccupantPos (int position)
|
||||
{
|
||||
occupants[position] = null;
|
||||
bodyOids[position] = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this table has a sufficient number of occupants
|
||||
* that the game can be started.
|
||||
|
||||
Reference in New Issue
Block a user