This version of the Battleship Game locates a ship on a random integer point in the first quadrant (or on an adjacent axis) with coordinates less than or equal to 10. At the same time, the game gives the ship a constant velocity, away from the origin, where the ship moves between each guess that you make. The limit on the motion is that the change in each coordinate will be a whole number between 0 and 3, inclusive. The ship can, and probably will, move out of the initial 10 by 10 square. Your job is to determine the location of the ship by making guesses. After each guess, the program will respond by telling you how far your guess is from the actual location of the ship. If your guess has missed the ship, then the ship will be moved to its new location waiting for your next guess. Since the velocity of the ship does not change within a game, the effect is to have the ship move in a straight line. There are a number of versions of the Battleship program listed on the main battleship page.
©Roger M. Palay Saline, MI 48176 December, 1997