CS 242 Spring 2012 : Assignment 1.4

This page last changed on Feb 20, 2012 by cemeyer2.

To The Tubes

Reading

The readings are due before lecture as usual, on Monday, February 27th.

Tutorial

The tutorials are due before lecture as usual, on Monday, February 27th.

Coding

The code is due at the start of your discussion section on March 1st or 2nd in Subversion in a folder named Assignment1.4. Please follow these naming conventions exactly.

Finishing Up Last Week’s Code

The first step of this week’s assignment is to finish up anything you did not finish last week. If you did not get your 1 player AI working correctly, now is the time to do it. See the write up from last week for details on what you need to do.

If you had already finished your AI from last week, now is the time to try to make it smarter. Try adding an additional level of difficulty that will cause the game play against it to be more challenging for the human player.

Let’s Get Networked

For this part of the assignment, you need to add networking capabilities to your Feudal game. It is up to you to come up with all of the details of how this will work. You can have a separate server program that clients connect to in a hub and spoke type of architecture, or you can have the server built into any client so the game can be ad-hoc.

At the very basic, your code for this week needs to:

  • Have clients connect either to each other or to the central server depending on the architecture you employ
  • Play the game

You will need to design the protocol that your clients use to do this yourself. You will need things in the protocol to accomplish tasks such as:

  • Start the game
  • Roll dice
  • Choose board halves for each player
  • Place pieces
  • Indicate turns
  • Make piece moves
  • Indicate piece attacks
  • Indicate game wins
  • And anything else you think you might need

Feel free to post your protocol on Piazza. That way, if other students match your protocol, you can test your game playing against them. You can make your protocol either binary or ASCII, its completely up to you. The only requirement for your protocol is that it is not hard-coded into your source code. That is, you should read it from a file. One simple way to do this is to use a Java Properties object and file. One example of how to use Java Properties from file and back is located here. This way, your protocol should be able to be easily switched out without recompiling the source files.

If you have any questions, feel free to post them on Piazza and the staff will do their best to get back to you as soon as possible.

Challenge!

For this optional challenge, make your architecture a hub and spoke architecture. That is, have a single central server that your clients connect to. The challenge is to have your server be able to handle multiple games running concurrently. To do this, you will need to make your server multi-threaded.

Rubric

Category Weight Notes
Basic Preparation 3 Ready to go at the start of section
Code Submission 6 Submitted on time and to the correct location in the repository
Decomposition 6  
Documentation 6 Comments for each class and each function listing a brief summary, its parameters, and its return value
Effort 3  
Naming 3  
Overall Design 9 Correct network architecture
Participation 6  
Presentation 3  
Requirements Satisfaction 9 Client
Requirements Satisfaction 6 Finish AI
Requirements Satisfaction 12 Server
Testing 9 Unit tests written to test server functions and protocol

parnas_modules.pdf (binary/octet-stream)
Document generated by Confluence on Mar 29, 2012 02:55

  1. No comments yet.

  1. No trackbacks yet.