CSE 271: Programming Assignment 10

Assigned: 17 April
Due: 24 April

Abstract

Modify your p9 (or p8) code to incorporate inter-process communication so that two people can play side-by-side.

Details

This project will modify your p9 (ideally, but a working p8 is sufficient) project, by changing how it interacts with your opponent.

Using named pipes, modify p9/p8 to read ship placement and attack coordinates from another process, and to write out your ship placement and attack coordinates to the other process. Note that this means that you will need to read from the pipe interactively, instead of being able to read the entire automated opponent configuration file at once.

When complete, you should be able to run your program in two different shell windows against each other. In fact, with correct permissions, another user could run your program against you. And while it is not required, it is likely that another player's program could be used, if the same conventions for pipes were used.

With the sole exception of knowing which is player 1 and which is player 2, there are no changes to how the user interface operates.

Please contact me with any questions (the earlier the better!).

Submission Requirements

  1. As usual, the program must reside in the cse271.131/p10 subdirectory and have a Makefile. Name your executable p10.
  2. Your name must be in the comment section (along with appropriate description, etc.).
  3. Do a touch DONE when the program is ready to be collected.

Last revised: 2 April 2013.