🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.games
Article #2447

Re: Battleship source for Unix w/curses

#2447
From: mcewan
Date: Sat, 22 Mar 1986 00:18
13 lines
1098 bytes
> 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.

That's easy. Just insert a "srand(getpid());" somewhere in the beginning
of the program, before the first "rand" call.

			Scott McEwan
			{ihnp4,pur-ee}!uiucdcs!mcewan

"I'm sorry, sir. According to your identification you're not even born
 yet. Come back in 500 years."
Technical Details
Message-ID: <9200033@uiucdcs>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!mcewan
References: <314@drivax.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site uiucdcs
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!mcewan
From: mcewan@uiucdcs.CS.UIUC.EDU
Newsgroups: net.games
Subject: Re: Battleship source for Unix w/curses
Message-ID: <9200033@uiucdcs>
Date: Fri, 21-Mar-86 19:18:00 EST
Article-I.D.: uiucdcs.9200033
Posted: Fri Mar 21 19:18:00 1986
Date-Received: Sat, 22-Mar-86 22:47:43 EST
References: <314@drivax.UUCP>
Lines: 13
Nf-ID: #R:drivax.UUCP:314:uiucdcs:9200033:000:458
Nf-From: uiucdcs.CS.UIUC.EDU!mcewan    Mar 21 18:18:00 1986