Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site ihlpg.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!ihlpg!tainter From: tainter@ihlpg.UUCP (Tainter) Newsgroups: net.games Subject: Re: Battleship source for Unix w/curses Message-ID: <1736@ihlpg.UUCP> Date: Thu, 27-Mar-86 12:41:22 EST Article-I.D.: ihlpg.1736 Posted: Thu Mar 27 12:41:22 1986 Date-Received: Sat, 29-Mar-86 06:21:23 EST References: <314@drivax.UUCP> <9200033@uiucdcs> <4336@dartvax.UUCP> Organization: AT&T Bell Laboratories Lines: 12 > That'll still have the same problem. getpid() will return the same pid > each time the same user runs it, thus you would get the same seed for > rand each time. Try srand(time()); instead. > David C. Kovar > USNET: {ihnp4|linus|decvax|cornell|astrovax}!dartvax!davidk%amber > ARPA: davidk%amber%dartmouth@csnet-relay > CSNET: davidk%amber@dartmouth It will?! Really? Hay guys did you all know that UNIX always gives the same process id to a program/user pair? Gosh, amazing. Seriously, IGNORE KOVAR'S ADVICE!! He was obviously thinking of getuid(). --j.a.tainter (Share and enjoy)/2 = Go stick your head in a pig.