1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.cb.jset;
21
22 /***
23 * Interface that players of a game must implement.
24 * <p>
25 * A player automatically listens to the board. There's no point otherwise.
26 *
27 * @author jerome@coffeebreaks.org - last modified by $LastChangedBy: jerome $
28 * @version $Id: SetGamePlayer.java 130 2004-04-15 05:18:07Z jerome $
29 */
30 public interface SetGamePlayer extends SetGameBoardListener
31 {
32 /***
33 * @return the name of the player.
34 */
35 String getName();
36
37 /***
38 * Called by a game when the player should be blocked.
39 * @see #isBlocked()
40 */
41 void block();
42
43 /***
44 * Called by a game when the player should be unblocked.
45 * @see #isBlocked()
46 */
47 void unblock();
48
49 /***
50 * A blocked player doesn't have the right to play.
51 * @return <code>true</code> is the player is blocked, <code>false</code> otherwise.
52 */
53 boolean isBlocked();
54
55 /***
56 * Called to notify a disconnection from a game.
57 */
58 void disconnect();
59 }