Class LRules

java.lang.Object
   |
   +----Rules
           |
           +----LRules

public class LRules
extends Rules
LRules
 

Version:
1.0b1 05/01/99

Variable Index

 o tab

Constructor Index

 o LRules()
constructor

Method Index

 o m(int, int[])
move, this method is called by move() it returns a new array for this move at this position on this board as if the paler was player 1
 o msg(int, boolean)
message to send a player when he plays something if p = true that does mean it's for the player and false for the oponnent
 o newGame()
init the board
 o r(int, int[])
return true if the player can replay
 o rtab(int[])
reverse the array,
 o v(int, int[])
return true if this move is valid
 o w(int[])
win, loose , tie return 0 if not finished 1 if this player win 2 if the opponent win -1 if it's a tie

Variables

 o tab
 public int tab[]

Constructors

 o LRules
 public LRules()
constructor

Methods

 o newGame
 public void newGame()
init the board

Overrides:
newGame in class Rules
 o rtab
 public int[] rtab(int stab[])
reverse the array,

Overrides:
rtab in class Rules
 o v
 public boolean v(int i,
                  int ttab[])
return true if this move is valid

Overrides:
v in class Rules
 o r
 public boolean r(int bol,
                  int ttab[])
return true if the player can replay

Overrides:
r in class Rules
 o m
 public int[] m(int i,
                int ttab[])
move, this method is called by move() it returns a new array for this move at this position on this board as if the paler was player 1

Overrides:
m in class Rules
 o w
 public int w(int ttab[])
win, loose , tie return 0 if not finished 1 if this player win 2 if the opponent win -1 if it's a tie

Overrides:
w in class Rules
 o msg
 public String msg(int bol,
                   boolean p)
message to send a player when he plays something if p = true that does mean it's for the player and false for the oponnent

Overrides:
msg in class Rules