Enforce the use of Game{Controller|Manager}Delegates where needed.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@654 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -296,6 +296,16 @@ public abstract class GameController extends PlaceController
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override // from PlaceController
|
||||||
|
protected void ratifyDelegate (PlaceControllerDelegate delegate)
|
||||||
|
{
|
||||||
|
super.ratifyDelegate(delegate);
|
||||||
|
if (!(delegate instanceof GameControllerDelegate)) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Must provide GameController with GameControllerDelegate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** A reference to the active parlor context. */
|
/** A reference to the active parlor context. */
|
||||||
protected ParlorContext _ctx;
|
protected ParlorContext _ctx;
|
||||||
|
|
||||||
|
|||||||
@@ -1283,6 +1283,15 @@ public class GameManager extends PlaceManager
|
|||||||
// nothing for now
|
// nothing for now
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override // from PlaceManager
|
||||||
|
protected void ratifyDelegate (PlaceManagerDelegate delegate)
|
||||||
|
{
|
||||||
|
super.ratifyDelegate(delegate);
|
||||||
|
if (!(delegate instanceof GameManagerDelegate)) {
|
||||||
|
throw new IllegalArgumentException("Must provide GameManager with GameManagerDelegate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Listens for game state changes. */
|
/** Listens for game state changes. */
|
||||||
protected AttributeChangeListener _stateListener = new AttributeChangeListener() {
|
protected AttributeChangeListener _stateListener = new AttributeChangeListener() {
|
||||||
public void attributeChanged (AttributeChangedEvent event) {
|
public void attributeChanged (AttributeChangedEvent event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user