Some cleaning up of the difficulty handling so that we can use it as the

basis for our star system.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3038 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-06-22 14:08:58 +00:00
parent 031331a5c3
commit 2f0b9939d7
10 changed files with 32 additions and 119 deletions
@@ -1,5 +1,5 @@
//
// $Id: PuzzleController.java,v 1.9 2004/05/05 02:38:22 ray Exp $
// $Id: PuzzleController.java,v 1.10 2004/06/22 14:08:58 mdb Exp $
package com.threerings.puzzle.client;
@@ -851,19 +851,6 @@ public abstract class PuzzleController extends GameController
}
}
/**
* Called when the puzzle difficulty level is changed.
*/
public void difficultyChanged (final int level)
{
// dispatch this to our delegates
applyToDelegates(PuzzleControllerDelegate.class, new DelegateOp() {
public void apply (PlaceControllerDelegate delegate) {
((PuzzleControllerDelegate)delegate).difficultyChanged(level);
}
});
}
/**
* Called when a player is knocked out of the game to give the puzzle
* a chance to perform any post-knockout actions that may be desired.
@@ -962,10 +949,7 @@ public abstract class PuzzleController extends GameController
protected AttributeChangeListener _mlist = new AttributeChangeListener() {
public void attributeChanged (AttributeChangedEvent event) {
String name = event.getName();
if (name.equals(PuzzleObject.DIFFICULTY)) {
difficultyChanged(_puzobj.difficulty);
} else if (name.equals(PuzzleObject.SEED)) {
if (name.equals(PuzzleObject.SEED)) {
generateNewBoard();
}
}
@@ -1,5 +1,5 @@
//
// $Id: PuzzleControllerDelegate.java,v 1.2 2004/02/25 14:48:44 mdb Exp $
// $Id: PuzzleControllerDelegate.java,v 1.3 2004/06/22 14:08:58 mdb Exp $
package com.threerings.puzzle.client;
@@ -146,13 +146,6 @@ public class PuzzleControllerDelegate extends GameControllerDelegate
{
}
/**
* Called when the puzzle difficulty level is changed.
*/
public void difficultyChanged (int level)
{
}
/** Our puzzle controller. */
protected PuzzleController _ctrl;
@@ -1,5 +1,5 @@
//
// $Id: PuzzleService.java,v 1.1 2003/11/26 01:42:34 mdb Exp $
// $Id: PuzzleService.java,v 1.2 2004/06/22 14:08:58 mdb Exp $
package com.threerings.puzzle.client;
@@ -43,10 +43,4 @@ public interface PuzzleService extends InvocationService
* Requests that this client depart whatever puzzle they occupy.
*/
public void leavePuzzle (Client client);
/**
* Requests that the difficulty level of the puzzle this client is
* currently occupying be changed to the specified difficulty level.
*/
public void changeDifficulty (Client client, int level);
}