-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClientPlayer.java
47 lines (36 loc) · 900 Bytes
/
ClientPlayer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package boardgame.play;
import boardgame.data.Command;
import boardgame.pieces.Board;
import boardgame.pieces.Color;
import java.io.*;
import java.net.*;
public class ClientPlayer extends Player {
private Socket server;
public ClientPlayer() {
// TODO Auto-generated constructor stub
}
public ClientPlayer(String name, Color color) {
super(name, color);
// TODO Auto-generated constructor stub
}
public ClientPlayer(String name, Color color, String address) throws UnknownHostException, IOException {
super(name, color);
server = new Socket(address, 0);
}
public Socket getServer() {
return server;
}
public void setServer(Socket server) {
this.server = server;
}
@Override
public int Move(Board b) {
// TODO Auto-generated method stub
return 0;
}
@Override
public int Move(Board b, Command c) {
// TODO Auto-generated method stub
return 0;
}
}