Fixed compile errors now that these classes are linked in...

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@36 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-08-09 01:00:13 +00:00
parent 92ce73208a
commit 6fc509432c
4 changed files with 30 additions and 23 deletions
@@ -30,10 +30,10 @@ import com.threerings.crowd.data.PlaceConfig;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.crowd.util.CrowdContext; import com.threerings.crowd.util.CrowdContext;
import com.threerings.parlor.Log;
import com.threerings.parlor.game.data.GameCodes; import com.threerings.parlor.game.data.GameCodes;
import com.threerings.parlor.game.data.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.data.GameObject; import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.game.data.PartyGameCodes;
import com.threerings.parlor.game.data.PartyGameConfig; import com.threerings.parlor.game.data.PartyGameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
@@ -69,7 +69,7 @@ public /*abstract*/ class GameController extends PlaceController
// super.init() calls createPlaceView(), we have our casted // super.init() calls createPlaceView(), we have our casted
// references already in place // references already in place
_ctx = (ctx as ParlorContext); _ctx = (ctx as ParlorContext);
_config = (config as GameConfig); _gconfig = (config as GameConfig);
super.init(ctx, config); super.init(ctx, config);
} }
@@ -195,7 +195,7 @@ public /*abstract*/ class GameController extends PlaceController
{ {
// deal with game state changes // deal with game state changes
var name :String = event.getName(); var name :String = event.getName();
if (GameObject.STATE.equals(name)) { if (GameObject.STATE == name) {
var newState :int = int(event.getValue()); var newState :int = int(event.getValue());
if (!stateDidChange(newState)) { if (!stateDidChange(newState)) {
log.warning("Game transitioned to unknown state " + log.warning("Game transitioned to unknown state " +
@@ -314,16 +314,16 @@ public /*abstract*/ class GameController extends PlaceController
*/ */
protected function isPartyGame () :Boolean protected function isPartyGame () :Boolean
{ {
return (_config is PartyGameConfig) && return (_gconfig is PartyGameConfig) &&
(PartyGameConfig(_config).getPartyGameType() != (PartyGameConfig(_gconfig).getPartyGameType() !=
PartyGameConfig.NOT_PARTY_GAME); PartyGameCodes.NOT_PARTY_GAME);
} }
/** A reference to the active parlor context. */ /** A reference to the active parlor context. */
protected var _pctx :ParlorContext; protected var _pctx :ParlorContext;
/** Our game configuration information. */ /** Our game configuration information. */
protected var _config :GameConfig; protected var _gconfig :GameConfig;
/** A reference to the game object for the game that we're /** A reference to the game object for the game that we're
* controlling. */ * controlling. */
@@ -21,9 +21,11 @@
package com.threerings.parlor.game.data { package com.threerings.parlor.game.data {
import com.threerings.util.ArrayUtil;
import com.threerings.util.Integer; import com.threerings.util.Integer;
import com.threerings.util.langBoolean; import com.threerings.util.langBoolean;
import com.threerings.util.Name; import com.threerings.util.Name;
import com.threerings.util.StringBuilder;
import com.threerings.io.ObjectInputStream; import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream; import com.threerings.io.ObjectOutputStream;
@@ -200,7 +202,7 @@ public class GameObject extends PlaceObject
*/ */
public function getWinnerCount () :int public function getWinnerCount () :int
{ {
int count = 0; var count :int = 0;
if (winners != null) { if (winners != null) {
for (var ii :int = 0; ii < winners.length; ii++) { for (var ii :int = 0; ii < winners.length; ii++) {
if (winners[ii]) { if (winners[ii]) {
@@ -236,7 +238,7 @@ public class GameObject extends PlaceObject
*/ */
public function getPartyGameType () :int public function getPartyGameType () :int
{ {
return PartyGameConfig.NOT_PARTY_GAME; return PartyGameCodes.NOT_PARTY_GAME;
} }
/** /**
@@ -0,0 +1,19 @@
package com.threerings.parlor.game.data {
public class PartyGameCodes
{
/** Party game constant indicating that this game, while it does
* implement PartyGameConfig, is not currently being played in party
* mode. */
public static const NOT_PARTY_GAME :int = 0;
/** Party game constant indicating that we're in a party game in which
* players must sit at an available seat to play, otherwise they're
* an observer. */
public static const SEATED_PARTY_GAME :int = 1;
/** Party game constant indicating that everyone in the game place is
* a "player", meaning that they do not need to claim a seat to play. */
public static const FREE_FOR_ALL_PARTY_GAME :int = 2;
}
}
@@ -29,20 +29,6 @@ package com.threerings.parlor.game.data {
*/ */
public interface PartyGameConfig public interface PartyGameConfig
{ {
/** Party game constant indicating that this game, while it does
* implement PartyGameConfig, is not currently being played in party
* mode. */
public static const NOT_PARTY_GAME :int = 0;
/** Party game constant indicating that we're in a party game in which
* players must sit at an available seat to play, otherwise they're
* an observer. */
public static const SEATED_PARTY_GAME :int = 1;
/** Party game constant indicating that everyone in the game place is
* a "player", meaning that they do not need to claim a seat to play. */
public static const FREE_FOR_ALL_PARTY_GAME :int = 2;
/** /**
* Get the type of party game being played. * Get the type of party game being played.
*/ */