soc.game
Class SOCOldLRStats

java.lang.Object
  extended by soc.game.SOCOldLRStats

public class SOCOldLRStats
extends java.lang.Object

This keeps track of the old LR stats (Longest Road). Used with SOCGame.putTempPiece(SOCPlayingPiece) / SOCGame.undoPutTempPiece(SOCPlayingPiece). Tracks each player's LR length, and the player who currently has the longest road.

Author:
Robert S. Thomas

Field Summary
(package private)  int[] lrLengths
           
(package private)  SOCPlayer playerWithLR
           
 
Constructor Summary
SOCOldLRStats(SOCGame ga)
          Remembers the game's current LR player and each player's LR lengths.
 
Method Summary
 void restoreOldStats(SOCGame ga)
          Restores the old LR stats within game state, from this object's saved data, after removing a temporary piece.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lrLengths

int[] lrLengths

playerWithLR

SOCPlayer playerWithLR
Constructor Detail

SOCOldLRStats

public SOCOldLRStats(SOCGame ga)
Remembers the game's current LR player and each player's LR lengths.

Parameters:
ga - the game
Method Detail

restoreOldStats

public void restoreOldStats(SOCGame ga)
Restores the old LR stats within game state, from this object's saved data, after removing a temporary piece.

Parameters:
ga - the game