The game of craps, which was developed as a program in Chapter 8, can involve two players. Restructure that program as a network application, so that a client can play against the server. The client gets to roll first, and then it and the server alternate. The first player to get a winning roll wins, whereas the first player to get a losing roll loses. The two players each have their own set of dice. (Hint: The client handler on the server side maintains the two Player objects for the game, and each Player object should perform one roll at a time. The client signals a new roll by pressing the enter key, whereas the server rolls automatically.)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here