Class MRules
java.lang.Object
|
+----Rules
|
+----MRules
- public class MRules
- extends Rules
usage: MRules(String player1)
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
-
tab
- initialisation des variables
-
MRules()
- constructor
-
m(int, int[])
- move
-
msg(int, boolean)
- message to send to this player
-
newGame()
- init the board
-
r(int, int[])
-
return true if the player can replay
-
rtab(int[])
- reverse the table
-
v(int, int[])
- is this move valid?
-
w(int[])
- win, loose , tie
tab
public int tab[]
- initialisation des variables
MRules
public MRules()
- constructor
newGame
public void newGame()
- init the board
- Overrides:
- newGame in class Rules
m
public int[] m(int bol,
int ttab[])
- move
- Overrides:
- m in class Rules
r
public boolean r(int bol,
int ttab[])
- return true if the player can replay
- Overrides:
- r in class Rules
w
public int w(int ttab[])
- win, loose , tie
- Overrides:
- w in class Rules
v
public boolean v(int bol,
int ttab[])
- is this move valid?
- Overrides:
- v in class Rules
rtab
public int[] rtab(int stab[])
- reverse the table
- Overrides:
- rtab in class Rules
msg
public String msg(int bol,
boolean p)
- message to send to this player
- Overrides:
- msg in class Rules