For Those Who Are Keen....
There are some things that you can do to make this programming assignment more interesting. You will
not get extra marks for any of these suggestions, and none of them are required.
- Print out a message saying how many bones were discovered after each guess
- Print out a message every time a complete line of bones has been discovered
- Write the program so that in addition to the user trying to guess where bones are hidden,
the user hides bones in a (different) yard, and the computer guesses where the user
has hidden the bones. Note that if you write the required version of this assignment in good Object
Oriented style, then making it a two player game is fairly easy, especially if the strategy that the computer
uses to guess is simple. (guessing randomly on the grid, for example)
- Write an intelligent strategy for guessing so that the computer is a tough opponent.
- Write the program so that instead of hiding 4 lines of bones of lengths 4,3,3,2, the program
will hide an arbitrary number of lines of arbitrary length. Note that this is not possible: once
the size of the grid has been specified that puts limitations on the number and lengths of bonelines.
If you try this, you should restrict 'arbitrary' to sets of bonelines that will actually fit, or
write an algorithm to determine whether the set of bonelines can possibly fit. Otherwise, your
random placement algorithm might loop forever....
- Write a GUI for the game.