Battleship v1.2 By Doug Greene (mcsecr@uky.campus.mci.net) Size: 7209 bytes to load on, plus about 3500 more to run it. Description: Classic Battleship. This is a one player game where you play against the computer. Strategically place your ships and then blast the computer's out of the water. I have also made a two player-link Battleship if you are interested in playing against someone else. Files included in BATLSHIP.83g: BATLSHIP - run the game from here ZBATLSHP ZBTLSHP1 ZBTLSHP2 ZBTLSHP3 ZBTLSHP4 GDB1 Pic0 - for gameboard *Note* - You will also need to have matrices [A], [B], [C], and [D] free. Pic1 will be used for the gameboard after you have set up all your ships, and list SAVE will be created if you save your game. These will be created during the game, and will then be deleted once the game is over to allow you as much space left on your calc for other things. Installation: Send BATLSHIP.83g to your TI-83 and then run the program BATLSHIP. Playing Battleship: Keys: A-H - use these to enter the column 1-9 - use these to enter the row Del - use this to Quit or Save your game. This is the same Battleship that we all grew up with, nothing new has been added. At the title screen, press enter to go to the main menu. There, you can either start a new game or load a game. If you choose new game, you will be taken to a menu where you choose which of your battleships to place on the board. Pick one, and then it asks you what direction, down or across. Choose one and then it takes you to the playing board and prompts "WHAT COL?". Hit any of the keys A-H to choose the column for the ship you chose (you don't need to hit alpha). Then it asks for the row. Type in any number from 1-8. If you do not wish to place your own ships, you can let the computer place them randomly by selecting Random Ships. Ships cannot go off the board and they cannot cross each other. When you have placed all your ships where you want them, you are ready to play against the computer. Type the column and row when prompted for your guess. If you miss, a O will be drawn in that square. If you hit, an X will be drawn. You may choose squares which have your ships in them, but the ships may be partially erased by the X or O. The computer guesses randomly, but if it hits a ship, it'll zero in on it and take it out. Once all three of your ships or the computer's ships have been sunk, the game is over. Saving a game: When prompted for a row or column, if you push Del, you will see a menu for quit, cancel, or save game. The Save Game option is only available during gameplay. Choose Save at the menu and your game will be saved in Matrices [A]-[D], and list SAVE. However, if you choose New Game at the start menu, your saved game will be overwritten. This is because the positions of the ships and hits and misses are all in Matrices [A]-[D], and these are the same matrices used for saving. In other words, the variables are just left in the matrices, and so if you start a new game, those variables will be overwritten by your new ships. I could have saved the variables in different matrices, but that would have taken up an extra 2000 bytes of memory, and I decided that that was too much. So saving a game is only useful when you want to take a break from your current game, and stuff like that. To load your last game, just choose Load from the start menu, and continue playing. When you save a game, all the variables are stored in list SAVE. The positions of your ships and the computer's ships are stored in matrices A and B (no cheating!), and the hits and misses are stored in matrices C and D. If you alter any of these, the game may not run correctly when you load it. Changes made in 1.2: I did not change a whole lot in the programming structure of the game. What I did was make the gameplay better and faster. Before, when you hit or miss, the proper symbol would appear on the board only after you pushed Enter when it said "MISS" or "HIT!". Now the symbol appears before the message is displayed. This is not a huge change, I know, but I think it made the game a little funner. It makes the game seem to go faster and therefor it becomes more enjoyable. Also I made the computer's guesses show up on the board so you know where it guessed. It only shows up temporarily though to avoid cluttering. Before, all you knew was that the computer missed, and it didn't tell you where it guessed. Bugs: One of the bugs I had in an earlier version I partially worked out. This bug was that the computer would get confused when it hit two ships side-by-side, assuming that they were one ship. Then it would go into an infinite looping and you'd have had to press ON to stop it. Now I've made it so that under certain circumstances, the computer will guess the opposite direction from the first hit. But that doesn't always work. So then it just continues guessing randomly, forgetting where it hit you last. That's a lot better than having to stop the game. I could probably work out the bug completely, giving the computer a way to realize its dillema, and then act accordingly. But that may take some work. Another bug that I've noticed while playing the game is that sometimes it reports a ship sunk when you haven't hit all of its places yet. I have no idea why it does this, and I've tried to figure it out to no avail. This only happens very rarely and it shouldn't be anything to worry about. Other than that, I don't think there are any bugs. But if you find any, please let me know. My e-mail address is mcsecr@uky.campus.mci.net. Miscellaneous: Please do not try and pass this game off as your own. If you think something should be changed, feel free to change it, but don't say that you made it if it is still pretty much the same game. If you have any comments, suggestions, ideas, or anything else, you can e-mail me at Doug142869@aol.com. Thanks for playing Battleship, and look for Battleship v2.0, the two player-link version(v2.0 is only two player, and this v1.1 is only one player). Have fun.