Nix unneeded imports, add @Overrides, remove content-free comments, and rerun code generators.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@670 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Dave Hoover
2008-07-18 19:02:08 +00:00
parent f30cb74ace
commit 624daadcd9
171 changed files with 371 additions and 459 deletions
@@ -97,7 +97,7 @@ public class PlayerStatusView extends JPanel
}
}
/** Returns a string representation of this instance. */
@Override
public String toString ()
{
return "[user=" + _username + ", pidx=" + _pidx +
@@ -49,7 +49,7 @@ public abstract class PuzzleAnimationWaiter extends AnimationWaiter
return (_puzobj.isInPlay() && (_sessionId == _puzobj.sessionId));
}
// documentation inherited
@Override
protected final void allAnimationsFinished ()
{
allAnimationsFinished(puzzleStillValid());
@@ -27,13 +27,9 @@ import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.geom.AffineTransform;
import java.util.ArrayList;
import javax.swing.UIManager;
import com.samskivert.swing.Label;
import com.samskivert.swing.util.SwingUtil;
import com.samskivert.util.StringUtil;
import com.threerings.media.VirtualMediaPanel;
@@ -110,6 +106,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
* If paused, a label will be displayed with the component's font,
* which may be set with setFont().
*/
@Override
public void setPaused (boolean paused)
{
if (paused) {
@@ -146,7 +143,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
anim.addAnimationObserver(_actionAnimObs);
}
// documentation inherited
@Override
public void abortAnimation (Animation anim)
{
super.abortAnimation(anim);
@@ -187,9 +184,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
_actionSprites.add(sprite);
}
/**
* Removes the given sprite from the board.
*/
@Override
public void removeSprite (Sprite sprite)
{
super.removeSprite(sprite);
@@ -205,14 +200,14 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
}
}
// documentation inherited
@Override
public void clearSprites ()
{
super.clearSprites();
_actionSprites.clear();
}
// documentation inherited
@Override
public void clearAnimations ()
{
super.clearAnimations();
@@ -250,6 +245,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
public void dumpActors ()
{
StringUtil.Formatter fmt = new StringUtil.Formatter() {
@Override
public String toString (Object obj) {
return StringUtil.shortClassName(obj);
}
@@ -302,7 +298,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
_avoidArranger.positionAvoidAnimation(anim, _vbounds);
}
// documentation inherited
@Override
public void paintBehind (Graphics2D gfx, Rectangle dirty)
{
super.paintBehind(gfx, dirty);
@@ -320,7 +316,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
gfx.fill(dirty);
}
// documentation inherited
@Override
public void paintBetween (Graphics2D gfx, Rectangle dirty)
{
super.paintBetween(gfx, dirty);
@@ -328,7 +324,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
renderBoard(gfx, dirty);
}
// documentation inherited
@Override
protected void paintInFront (Graphics2D gfx, Rectangle dirty)
{
super.paintInFront(gfx, dirty);
@@ -404,6 +400,7 @@ public abstract class PuzzleBoardView extends VirtualMediaPanel
/** Listens to our action animations and clears them when they're done. */
protected AnimationAdapter _actionAnimObs = new AnimationAdapter() {
@Override
public void animationCompleted (Animation anim, long when) {
animationFinished(anim);
}
@@ -36,8 +36,6 @@ import com.samskivert.swing.util.MouseHijacker;
import com.samskivert.util.CollectionUtil;
import com.samskivert.util.ObserverList;
import com.samskivert.util.StringUtil;
import com.threerings.media.FrameParticipant;
import com.threerings.presents.dobj.AttributeChangeListener;
@@ -88,7 +86,7 @@ public abstract class PuzzleController extends GameController
public int actionCleared ();
}
// documentation inherited
@Override
protected void didInit ()
{
super.didInit();
@@ -125,7 +123,7 @@ public abstract class PuzzleController extends GameController
return _pidx;
}
// documentation inherited
@Override
public void setGameOver (boolean gameOver)
{
super.setGameOver(gameOver);
@@ -182,6 +180,7 @@ public abstract class PuzzleController extends GameController
// dispatch the change to our delegates
applyToDelegates(new DelegateOp(PuzzleControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
((PuzzleControllerDelegate)delegate).setChatting(_chatting);
}
@@ -226,6 +225,7 @@ public abstract class PuzzleController extends GameController
// check with the delegates
final boolean[] canChatNow = new boolean[] { true };
applyToDelegates(new DelegateOp(PuzzleControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
canChatNow[0] =
((PuzzleControllerDelegate)delegate).canStartChatting() &&
@@ -244,7 +244,7 @@ public abstract class PuzzleController extends GameController
return _chatting;
}
// documentation inherited
@Override
public void willEnterPlace (PlaceObject plobj)
{
super.willEnterPlace(plobj);
@@ -269,7 +269,7 @@ public abstract class PuzzleController extends GameController
}
}
// documentation inherited
@Override
public void mayLeavePlace (PlaceObject plobj)
{
super.mayLeavePlace(plobj);
@@ -278,7 +278,7 @@ public abstract class PuzzleController extends GameController
sendProgressUpdate();
}
// documentation inherited
@Override
public void didLeavePlace (PlaceObject plobj)
{
super.didLeavePlace(plobj);
@@ -319,7 +319,7 @@ public abstract class PuzzleController extends GameController
return true;
}
// documentation inherited
@Override
public void attributeChanged (AttributeChangedEvent event)
{
String name = event.getName();
@@ -370,7 +370,7 @@ public abstract class PuzzleController extends GameController
}
}
// documentation inherited
@Override
protected void gameWillReset ()
{
super.gameWillReset();
@@ -449,6 +449,7 @@ public abstract class PuzzleController extends GameController
// let our delegates do their business
applyToDelegates(new DelegateOp(PuzzleControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
((PuzzleControllerDelegate)delegate).startAction();
}
@@ -559,6 +560,7 @@ public abstract class PuzzleController extends GameController
// let our delegates do their business
applyToDelegates(new DelegateOp(PuzzleControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
canClear[0] = canClear[0] &&
((PuzzleControllerDelegate)delegate).canClearAction();
@@ -601,6 +603,7 @@ public abstract class PuzzleController extends GameController
// let our delegates do their business
applyToDelegates(new DelegateOp(PuzzleControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
((PuzzleControllerDelegate)delegate).clearAction();
}
@@ -648,7 +651,7 @@ public abstract class PuzzleController extends GameController
{
}
// documentation inherited
@Override
public boolean handleAction (ActionEvent action)
{
String cmd = action.getActionCommand();
@@ -695,6 +698,7 @@ public abstract class PuzzleController extends GameController
// let our delegates do their business
applyToDelegates(new DelegateOp(PuzzleControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
((PuzzleControllerDelegate)delegate).setBoard(_pboard);
}
@@ -796,6 +800,7 @@ public abstract class PuzzleController extends GameController
{
// dispatch this to our delegates
applyToDelegates(new DelegateOp(PuzzleControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
((PuzzleControllerDelegate)delegate).playerKnockedOut(pidx);
}
@@ -816,6 +821,7 @@ public abstract class PuzzleController extends GameController
panel.getBoardView().addMouseListener(_clicker);
}
@Override
public Component release ()
{
_panel.removeMouseListener(_clicker);
@@ -824,6 +830,7 @@ public abstract class PuzzleController extends GameController
}
protected MouseAdapter _clicker = new MouseAdapter() {
@Override
public void mousePressed (MouseEvent event) {
setChatting(false); // this will call release
}
@@ -938,6 +945,7 @@ public abstract class PuzzleController extends GameController
/** A key listener that currently just toggles pause in the puzzle. */
protected KeyListener _globalKeyListener = new KeyAdapter() {
@Override
public void keyReleased (KeyEvent e)
{
int keycode = e.getKeyCode();
@@ -50,7 +50,7 @@ public class PuzzleControllerDelegate extends GameControllerDelegate
_ctrl = ctrl;
}
// documentation inherited
@Override
public void willEnterPlace (PlaceObject plobj)
{
super.willEnterPlace(plobj);
@@ -59,7 +59,7 @@ public class PuzzleControllerDelegate extends GameControllerDelegate
_puzobj = (PuzzleObject)plobj;
}
// documentation inherited
@Override
public void didLeavePlace (PlaceObject plobj)
{
super.didLeavePlace(plobj);
@@ -77,7 +77,7 @@ public abstract class PuzzlePanel extends JPanel
add(_bpanel, BorderLayout.CENTER);
}
// documentation inherited
@Override
public void addNotify ()
{
super.addNotify();
@@ -87,7 +87,7 @@ public abstract class PuzzlePanel extends JPanel
setPuzzleGrabsKeys(false);
}
// documentation inherited
@Override
public void removeNotify ()
{
super.removeNotify();
@@ -47,7 +47,7 @@ public abstract class Board
*/
public abstract boolean equals (Board other);
// documentation inherited
@Override
public Object clone ()
{
try {
@@ -96,13 +96,13 @@ public abstract class Board
setSeed(seed);
}
// documentation inherited
@Override
public synchronized void setSeed (long seed)
{
_seed = (seed ^ multiplier) & mask;
}
// documentation inherited
@Override
synchronized protected int next (int bits)
{
long nextseed = (_seed * multiplier + addend) & mask;
@@ -110,7 +110,7 @@ public abstract class Board
return (int)(nextseed >>> (48 - bits));
}
// documentation inherited
@Override
public void nextBytes (byte[] bytes)
{
unimplemented();
@@ -122,7 +122,7 @@ public abstract class Board
// nextBoolean()
// nextFloat()
// documentation inherited
@Override
public int nextInt (int n)
{
if (n <= 0) {
@@ -141,14 +141,14 @@ public abstract class Board
return val;
}
// documentation inherited
@Override
public double nextDouble ()
{
long l = ((long)(next(26)) << 27) + next(27);
return l / (double)(1L << 53);
}
// documentation inherited
@Override
public synchronized double nextGaussian ()
{
if (_haveNextNextGaussian) {
@@ -169,7 +169,7 @@ public abstract class Board
}
}
// documentation inherited
@Override
public Object clone ()
{
try {
@@ -23,7 +23,6 @@ package com.threerings.puzzle.data;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
import com.threerings.puzzle.client.PuzzleGameService;
/**
@@ -68,7 +68,7 @@ public class DropBlockSprite extends DropSprite
_orient = orient;
}
// documentation inherited
@Override
protected void init ()
{
super.init();
@@ -124,21 +124,21 @@ public class DropBlockSprite extends DropSprite
return _ecol;
}
// documentation inherited
@Override
public void setColumn (int col)
{
super.setColumn(col);
updateDropInfo();
}
// documentation inherited
@Override
public void setRow (int row)
{
super.setRow(row);
updateDropInfo();
}
// documentation inherited
@Override
public void setBoardLocation (int row, int col)
{
super.setBoardLocation(row, col);
@@ -149,6 +149,7 @@ public class DropBlockSprite extends DropSprite
* Updates the sprite image offset to reflect the direction in which
* the external piece is hanging.
*/
@Override
public void setOrientation (int orient)
{
super.setOrientation(orient);
@@ -168,7 +169,7 @@ public class DropBlockSprite extends DropSprite
updateDropInfo();
}
// documentation inherited
@Override
public void toString (StringBuilder buf)
{
super.toString(buf);
@@ -81,6 +81,7 @@ public abstract class DropBoardView extends PuzzleBoardView
/**
* Initializes the board with the board dimensions.
*/
@Override
public void init (GameConfig config)
{
DropConfig dconfig = (DropConfig)config;
@@ -265,6 +266,7 @@ public abstract class DropBoardView extends PuzzleBoardView
Point end = new Point();
getPiecePosition(tx, ty, end);
piece.addSpriteObserver(new PathAdapter() {
@Override
public void pathCompleted (Sprite sprite, Path path, long when) {
sprite.removeSpriteObserver(this);
if (_pieces[tpos] != null) {
@@ -323,7 +325,7 @@ public abstract class DropBoardView extends PuzzleBoardView
public abstract Mirage getPieceImage (
int piece, int col, int row, int orient);
// documentation inherited
@Override
public void setBoard (Board board)
{
// when a new board arrives, we want to remove all drop sprites
@@ -525,7 +527,7 @@ public abstract class DropBoardView extends PuzzleBoardView
// nothing for now
}
// documentation inherited
@Override
public void paintBetween (Graphics2D gfx, Rectangle dirtyRect)
{
gfx.translate(0, -_roff);
@@ -534,7 +536,7 @@ public abstract class DropBoardView extends PuzzleBoardView
gfx.translate(0, _roff);
}
// documentation inherited
@Override
public Dimension getPreferredSize ()
{
int wid = _bwid * _pwid;
@@ -26,8 +26,6 @@ import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.util.List;
import com.samskivert.util.IntListUtil;
import com.threerings.media.FrameParticipant;
@@ -51,7 +49,6 @@ import com.threerings.puzzle.drop.data.DropConfig;
import com.threerings.puzzle.drop.data.DropLogic;
import com.threerings.puzzle.drop.data.DropPieceCodes;
import com.threerings.puzzle.drop.util.PieceDropLogic;
import com.threerings.puzzle.drop.util.PieceDropper.PieceDropInfo;
import com.threerings.puzzle.drop.util.PieceDropper;
import static com.threerings.puzzle.Log.log;
@@ -124,7 +121,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
}
}
// documentation inherited
@Override
public void init (CrowdContext ctx, PlaceConfig config)
{
super.init(ctx, config);
@@ -169,6 +166,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
/**
* Starts up the action; tries evolving the board to get things going.
*/
@Override
protected void startAction ()
{
super.startAction();
@@ -207,7 +205,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
unstabilizeBoard();
}
// documentation inherited
@Override
protected boolean canClearAction ()
{
if (!_stable) {
@@ -221,6 +219,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
* sprites, any pieces rising in the board, and resets the animation
* timestamps.
*/
@Override
protected void clearAction ()
{
super.clearAction();
@@ -246,7 +245,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
_ctx.getFrameManager().removeFrameParticipant(this);
}
// documentation inherited
@Override
public void gameDidEnd ()
{
super.gameDidEnd();
@@ -259,7 +258,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
// _dview.setRisingPieces(null);
}
// documentation inherited
@Override
public boolean handleAction (ActionEvent action)
{
// handle any block-related movement actions
@@ -281,7 +280,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
return true;
}
// documentation inherited
@Override
public void setBoard (Board board)
{
super.setBoard(board);
@@ -1183,6 +1182,7 @@ public abstract class DropControllerDelegate extends PuzzleControllerDelegate
/** Used to evolve the board following the completion of animations. */
protected AnimationAdapter _evolveObserver = new AnimationAdapter() {
@Override
public void animationCompleted (Animation anim, long when) {
animationDidFinish(anim);
}
@@ -32,8 +32,6 @@ import com.threerings.util.DirectionUtil;
import com.threerings.media.image.Mirage;
import com.threerings.media.sprite.Sprite;
import static com.threerings.puzzle.Log.log;
/**
* The drop sprite is a sprite that displays one or more pieces falling
* toward the bottom of the board.
@@ -79,7 +77,7 @@ public class DropSprite extends Sprite
setRenderOrder(renderOrder);
}
// documentation inherited
@Override
protected void init ()
{
super.init();
@@ -304,7 +302,7 @@ public class DropSprite extends Sprite
setLocation(_ox, _srcPos.y+1);
}
// documentation inherited
@Override
public boolean inside (Shape shape)
{
return shape.contains(_bounds);
@@ -336,7 +334,7 @@ public class DropSprite extends Sprite
return pctdone;
}
// documentation inherited
@Override
public void paint (Graphics2D gfx)
{
// get the column and row increment based on the sprite's orientation
@@ -370,7 +368,7 @@ public class DropSprite extends Sprite
image.paint(gfx, x, y);
}
// documentation inherited
@Override
public void tick (long timestamp)
{
super.tick(timestamp);
@@ -440,7 +438,7 @@ public class DropSprite extends Sprite
// Log.info("Moved to row " + _row);
}
// documentation inherited
@Override
public void fastForward (long timeDelta)
{
if (_rowstamp > 0) {
@@ -448,7 +446,7 @@ public class DropSprite extends Sprite
}
}
// documentation inherited
@Override
public void toString (StringBuilder buf)
{
super.toString(buf);
@@ -470,7 +468,7 @@ public class DropSprite extends Sprite
setLocation(_srcPos.x, _srcPos.y);
}
// documentation inherited
@Override
public void setOrientation (int orient)
{
invalidate();
@@ -61,7 +61,7 @@ public class NextBlockView extends JComponent
repaint();
}
// documentation inherited
@Override
public void paintComponent (Graphics g)
{
super.paintComponent(g);
@@ -85,7 +85,7 @@ public class NextBlockView extends JComponent
}
}
// documentation inherited
@Override
public Dimension getPreferredSize ()
{
int wid = (_orient == VERTICAL) ? _pwid : (2 * _pwid);
@@ -25,13 +25,11 @@ import java.awt.Graphics2D;
import java.awt.Rectangle;
import com.threerings.media.animation.Animation;
import com.threerings.media.sprite.ImageSprite;
import com.threerings.media.sprite.PathObserver;
import com.threerings.media.sprite.Sprite;
import com.threerings.media.util.Path;
import com.threerings.puzzle.drop.data.DropBoard;
import com.threerings.puzzle.drop.data.DropPieceCodes;
/**
* Animates all the pieces on a puzzle board doing some sort of global
@@ -51,13 +49,13 @@ public abstract class PieceGroupAnimation extends Animation
_board = board;
}
// documentation inherited
@Override
public void tick (long tickStamp)
{
// nothing doing
}
// documentation inherited
@Override
public void paint (Graphics2D gfx)
{
// nothing doing
@@ -75,7 +73,7 @@ public abstract class PieceGroupAnimation extends Animation
_finished = (--_penders == 0);
}
// documentation inherited
@Override
protected void willStart (long tickStamp)
{
super.willStart(tickStamp);
@@ -27,8 +27,6 @@ import java.util.Arrays;
import org.apache.commons.lang.StringUtils;
import com.threerings.util.DirectionUtil;
import com.threerings.puzzle.data.Board;
import com.threerings.puzzle.drop.client.DropControllerDelegate;
import com.threerings.puzzle.drop.util.DropBoardUtil;
@@ -534,13 +532,13 @@ public class DropBoard extends Board
op.execute(this, col, row);
}
// documentation inherited from interface
@Override
public void dump ()
{
dumpAndCompare(null);
}
// documentation inherited from interface
@Override
public void dumpAndCompare (Board other)
{
if (other != null && !(other instanceof DropBoard)) {
@@ -571,7 +569,7 @@ public class DropBoard extends Board
}
}
/** Returns a string representation of this instance. */
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder();
@@ -580,7 +578,7 @@ public class DropBoard extends Board
return buf.append("]").toString();
}
// documentation inherited from interface
@Override
public boolean equals (Board other)
{
// make sure we're comparing the same class type
@@ -694,7 +692,7 @@ public class DropBoard extends Board
_board = board;
}
// documentation inherited
@Override
public Object clone ()
{
DropBoard board = (DropBoard)super.clone();
@@ -66,7 +66,7 @@ public class DropBoardSummary extends BoardSummary
return idx;
}
// documentation inherited
@Override
public void setBoard (Board board)
{
_dboard = (DropBoard)board;
@@ -76,7 +76,7 @@ public class DropBoardSummary extends BoardSummary
super.setBoard(board);
}
// documentation inherited
@Override
public void summarize ()
{
// update the board column levels
@@ -50,9 +50,7 @@ public class SegmentInfo
this.len = len;
}
/**
* Returns a string representation of this instance.
*/
@Override
public String toString ()
{
return StringUtil.fieldsToString(this);
@@ -89,7 +89,7 @@ public abstract class DropManagerDelegate extends PuzzleManagerDelegate
}
}
// documentation inherited
@Override
public void didInit (PlaceConfig config)
{
_dconfig = (DropConfig)config;
@@ -101,7 +101,7 @@ public abstract class DropManagerDelegate extends PuzzleManagerDelegate
super.didInit(config);
}
// documentation inherited
@Override
public void didStartup (PlaceObject plobj)
{
super.didStartup(plobj);
@@ -116,7 +116,7 @@ public abstract class DropManagerDelegate extends PuzzleManagerDelegate
}
}
// documentation inherited
@Override
public void gameWillStart ()
{
super.gameWillStart();
@@ -21,10 +21,6 @@
package com.threerings.puzzle.drop.util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.samskivert.util.StringUtil;
import com.threerings.puzzle.drop.data.DropBoard;
@@ -65,7 +61,7 @@ public class PieceDropper
this.dist = dist;
}
/** Returns a string representation of this instance. */
@Override
public String toString ()
{
return StringUtil.fieldsToString(this);
@@ -22,7 +22,6 @@
package com.threerings.puzzle.server;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
import com.threerings.puzzle.data.Board;
@@ -33,10 +33,10 @@ public interface PuzzleGameProvider extends InvocationProvider
/**
* Handles a {@link PuzzleGameService#updateProgress} request.
*/
public void updateProgress (ClientObject caller, int arg1, int[] arg2);
void updateProgress (ClientObject caller, int arg1, int[] arg2);
/**
* Handles a {@link PuzzleGameService#updateProgressSync} request.
*/
public void updateProgressSync (ClientObject caller, int arg1, int[] arg2, Board[] arg3);
void updateProgressSync (ClientObject caller, int arg1, int[] arg2, Board[] arg3);
}
@@ -28,18 +28,8 @@ import com.samskivert.util.Interval;
import com.samskivert.util.RandomUtil;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.OidList;
import com.threerings.crowd.data.BodyObject;
import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.game.server.GameManager;
import com.threerings.util.MessageBundle;
import com.threerings.util.Name;
import com.threerings.puzzle.data.Board;
import com.threerings.puzzle.data.BoardSummary;
import com.threerings.puzzle.data.PuzzleCodes;
@@ -127,7 +117,7 @@ public abstract class PuzzleManager extends GameManager
}
}
// documentation inherited
@Override
protected void playerGameDidEnd (int pidx)
{
super.playerGameDidEnd(pidx);
@@ -158,7 +148,7 @@ public abstract class PuzzleManager extends GameManager
return false;
}
// documentation inherited
@Override
protected void didStartup ()
{
super.didStartup();
@@ -170,7 +160,7 @@ public abstract class PuzzleManager extends GameManager
_puzobj.setPuzzleGameService(_invmgr.registerDispatcher(new PuzzleGameDispatcher(this)));
}
// documentation inherited
@Override
protected void gameWillStart ()
{
int size = getPlayerSlots();
@@ -205,6 +195,7 @@ public abstract class PuzzleManager extends GameManager
if (_statusInterval == null && statusInterval > 0) {
// register the status update interval to address subsequent periodic updates
_statusInterval = new Interval(_omgr) {
@Override
public void expired () {
sendStatusUpdate();
}
@@ -236,7 +227,7 @@ public abstract class PuzzleManager extends GameManager
return DEFAULT_DIFFICULTY;
}
// documentation inherited
@Override
protected void gameDidStart ()
{
super.gameDidStart();
@@ -332,7 +323,7 @@ public abstract class PuzzleManager extends GameManager
return (_puzobj.isOccupiedPlayer(pidx));
}
// documentation inherited
@Override
protected void gameDidEnd ()
{
if (_statusInterval != null) {
@@ -347,7 +338,7 @@ public abstract class PuzzleManager extends GameManager
super.gameDidEnd();
}
// documentation inherited
@Override
protected void didShutdown ()
{
super.didShutdown();
@@ -452,6 +443,7 @@ public abstract class PuzzleManager extends GameManager
* Overrides the game manager implementation to mark all active players as winners. Derived
* classes may wish to override this method in order to customize the winning conditions.
*/
@Override
protected void assignWinners (boolean[] winners)
{
for (int ii = 0; ii < winners.length; ii++) {
@@ -520,7 +512,7 @@ public abstract class PuzzleManager extends GameManager
applyProgressEvents(pidx, events, states);
}
// documentation inherited
@Override
protected void tick (long tickStamp)
{
super.tick(tickStamp);
@@ -163,9 +163,7 @@ public class PointSet
return _count;
}
/**
* Returns a string representation of the point set.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder();
@@ -33,8 +33,7 @@ import com.threerings.puzzle.client.PuzzlePanel;
public class PuzzleGameUtil
{
/**
* Returns a key translator configured with basic puzzle game
* mappings.
* Returns a key translator configured with basic puzzle game mappings.
*/
public static KeyTranslatorImpl getKeyTranslator ()
{
@@ -42,8 +41,7 @@ public class PuzzleGameUtil
if (!PuzzlePanel.isRobotTesting()) {
// add the standard pause keys
xlate.addPressCommand(
KeyEvent.VK_P, PuzzleController.TOGGLE_CHATTING);
xlate.addPressCommand(KeyEvent.VK_P, PuzzleController.TOGGLE_CHATTING);
}
return xlate;