Class Rules

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

class Rules
extends Object
usage: Rules(String player1)
super class for evry type of rules See if the move is ok and determine if the player can move again
 The way to call the rules method: verif replay move and win
 method(int bol, String player) for the server
 like this Rules can invert the table or not


Variable Index

 o name1
 o tab

Constructor Index

 o Rules()

Method Index

 o getTab(String)
return the table, depending on the player's name
 o getTabS(String)
 o itab()
 o m(int, int[])
 o move(int, String)
call m() depending on the player's name
 o msg(int, boolean)
 o newGame()
 o r(int, int[])
 o replay(int, String)
 o rtab(int[])
 o setName1(String)
set the name of the player1
 o v(int, int[])
 o verif(int, String)
 o w(int[])
 o win(String)

Variables

 o tab
 public int tab[]
 o name1
 public String name1

Constructors

 o Rules
 public Rules()

Methods

 o newGame
 public void newGame()
 o m
 public int[] m(int i,
                int ttab[])
 o r
 public boolean r(int bol,
                  int ttab[])
 o w
 public int w(int ttab[])
 o v
 public boolean v(int i,
                  int ttab[])
 o rtab
 public int[] rtab(int stab[])
 o msg
 public String msg(int bol,
                   boolean p)
 o setName1
 public void setName1(String s)
set the name of the player1

 o getTab
 public int[] getTab(String player)
return the table, depending on the player's name

 o move
 public int[] move(int bol,
                   String player)
call m() depending on the player's name

 o getTabS
 public String getTabS(String player)
 o verif
 public boolean verif(int bol,
                      String player)
 o win
 public int win(String player)
 o replay
 boolean replay(int bol,
                String player)
 o itab
 int[] itab()