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
-
name1
-
-
tab
-
-
Rules()
-
-
getTab(String)
- return the table, depending on the player's name
-
getTabS(String)
-
-
itab()
-
-
m(int, int[])
-
-
move(int, String)
- call m() depending on the player's name
-
msg(int, boolean)
-
-
newGame()
-
-
r(int, int[])
-
-
replay(int, String)
-
-
rtab(int[])
-
-
setName1(String)
- set the name of the player1
-
v(int, int[])
-
-
verif(int, String)
-
-
w(int[])
-
-
win(String)
-
tab
public int tab[]
name1
public String name1
Rules
public Rules()
newGame
public void newGame()
m
public int[] m(int i,
int ttab[])
r
public boolean r(int bol,
int ttab[])
w
public int w(int ttab[])
v
public boolean v(int i,
int ttab[])
rtab
public int[] rtab(int stab[])
msg
public String msg(int bol,
boolean p)
setName1
public void setName1(String s)
- set the name of the player1
getTab
public int[] getTab(String player)
- return the table, depending on the player's name
move
public int[] move(int bol,
String player)
- call m() depending on the player's name
getTabS
public String getTabS(String player)
verif
public boolean verif(int bol,
String player)
win
public int win(String player)
replay
boolean replay(int bol,
String player)
itab
int[] itab()