CSE 271: Programming Assignment 9

Assigned: 8 April
Due: 17 April

Abstract

Modify your p8 code to incorporate textual graphics and improve on terminal i/o.

Details

This project will modify your p8 project, improving how it interacts with the user.

Using curses, build an on-screen grid in which the user places ships and fires missiles by moving a cursor to the grid location of interest and presses an appropriate key. Status messages (along with the grid of your own ships and the places the computer has fired upon) should appear in another section of the screen.

Your goal here is to use what you have learned about manipulating terminal I/O to position text, eliminate echoing, editing and buffering so that you no longer ask for a line of input at a time, but instead interpret individual keystrokes. Your program should not require the user to press enter/return at all.

Be sure to include a help mode that is accessible by pressing the h key -- this mode should explain how to use the other keys to play the game.

There are no changes to how the automated opponent operates.

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

Submission Requirements

  1. As usual, the program must reside in the cse271.131/p9 subdirectory and have a Makefile. Name your executable p9.
  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.