Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site wjvax.wjvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!pyramid!pesnta!wjvax!karen From: karen@wjvax.UUCP (Karen Pline) Newsgroups: net.sources,net.games Subject: Re: Battleship source for Unix w/curses Message-ID: <669@wjvax.wjvax.UUCP> Date: Mon, 17-Mar-86 19:26:54 EST Article-I.D.: wjvax.669 Posted: Mon Mar 17 19:26:54 1986 Date-Received: Fri, 21-Mar-86 04:46:47 EST References: <314@drivax.UUCP> <11587@watnot.UUCP> <141@ucrmath.UUCP> Reply-To: karen@wjvax.UUCP (Karen Pline) Distribution: net Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 38 Xref: watmath net.sources:4604 net.games:2638 [munch munch.....] Regarding the Battleship Source posted to the net by Bruce: We solved the problem with curses on BSD 4.2 by adding four short routines to the bottom of the program - fairly simple. Also, whenever you play the game, it thinks you're Bruce (I took care of that, too). My problem, however, is with the pattern that the ships are set up in. The first time you play the game (every time you play it) the pattern that the ships are in is identical. If you stay in the game when the computer asks if you want to play again, a new pattern will be set up. But every time you restart the game, the same patterns repeat. So, once you play through the patterns without getting out of the program, you know the patterns for the next time you play (I hope this makes sense). There may be something wrong with the random pattern generator in the program (if there is one), but I haven't had time to look. If someone looks into this, please post to the net or let me know. Anyway, I've never posted to this group before, but I thought this was of general interest since so many people grabbed this piece of code. And since we're talking battleship games, we've had one on our system for a while which also came from the net (I think). I can't remember who posted it, but it also has a problem. When it searches for your ships, it always assumes you set yours up under the same strategy it sets its own ships up with - i.e., good possibility of adjacency. Then, it doesn't eliminate logically. By this I mean that even if it hits all the ships except the Carrier, it still looks for adjacencies or guesses randomly instead of just looking for openings where the five holes would fit. Needless to say, I've never lost (and believe me, I've played more than 100 times) even when I try to accomodate it a little bit. Karen Pline