net.jetrix.winlist
Class TetrixWinlist

java.lang.Object
  extended by net.jetrix.winlist.SimpleWinlist
      extended by net.jetrix.winlist.TetrixWinlist
All Implemented Interfaces:
Winlist

public class TetrixWinlist
extends SimpleWinlist

A winlist caompatible with the tetrinetx winlist format.

Version:
$Revision: 403 $, $Date: 2004-06-11 19:52:09 +0200 (ven., 11 juin 2004) $
Author:
Emmanuel Bourg

Field Summary
static int DEFAULT_WINLIST_SIZE
           
static int STRUCT_SIZE
           
 
Fields inherited from class net.jetrix.winlist.SimpleWinlist
config, initialized, log, persistent, scores
 
Constructor Summary
TetrixWinlist()
           
 
Method Summary
protected  Score buildScore(byte[] struct)
          Build a score from a tetrix winlist structure.
protected  byte[] buildStruct(Score score)
          Build a tetrix winlist structure from a score.
 void init(WinlistConfig config)
          Initialize the winlist.
protected  void load()
          Load the winlist from a file.
protected  void save()
          Save the winlist to a file.
 
Methods inherited from class net.jetrix.winlist.SimpleWinlist
clear, getConfig, getGainMessage, getId, getScore, getScores, isPersistent, saveGameResult, setId, setPersistent, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRUCT_SIZE

public static final int STRUCT_SIZE
See Also:
Constant Field Values

DEFAULT_WINLIST_SIZE

public static final int DEFAULT_WINLIST_SIZE
See Also:
Constant Field Values
Constructor Detail

TetrixWinlist

public TetrixWinlist()
Method Detail

init

public void init(WinlistConfig config)
Description copied from interface: Winlist
Initialize the winlist.

Specified by:
init in interface Winlist
Overrides:
init in class SimpleWinlist
Parameters:
config - the winlist configuration

load

protected void load()
Description copied from class: SimpleWinlist
Load the winlist from a file.

Overrides:
load in class SimpleWinlist

save

protected void save()
Description copied from class: SimpleWinlist
Save the winlist to a file.

Overrides:
save in class SimpleWinlist

buildScore

protected Score buildScore(byte[] struct)
Build a score from a tetrix winlist structure.


buildStruct

protected byte[] buildStruct(Score score)
Build a tetrix winlist structure from a score.



Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.