-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBigTwoServer.java
More file actions
37 lines (35 loc) · 872 Bytes
/
BigTwoServer.java
File metadata and controls
37 lines (35 loc) · 872 Bytes
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
/**
* This class is used to model a Big Two card game server.
* @author Kenneth Wong
*
*/
public class BigTwoServer extends CardGameServer {
/**
* Creates and returns an instance of the BigTwoServer class.
*/
public BigTwoServer() {
super("Big Two Server", 4);
}
/**
* Creates and returns an instance of the BigTwoDeck class.
* @return an instance of the BigTwoDeck class
*/
public Deck createDeck() {
return new BigTwoDeck();
}
/**
* main() method for starting the server.
*
* @param args
* the port to be used by the server. The default port 5000 will
* be used if no arguments has been supplied
*/
public static void main(String[] args) {
BigTwoServer server = new BigTwoServer();
if (args.length > 0) {
server.start(Integer.parseInt(args[0]));
} else {
server.start(2396);
}
} // main
}