home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / sources / 2868 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.6 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!stanford.edu!rutgers!ucla-cs!ucla-se!CAD.UCLA.EDU!jonathan
  2. From: jonathan@CAD.UCLA.EDU (Jonathan Katz)
  3. Newsgroups: alt.sources
  4. Subject: Re: Chanukah stuff -- Dreidle simulator.
  5. Keywords: Random isn't, ANSI isn't.
  6. Message-ID: <8979@lee.SEAS.UCLA.EDU>
  7. Date: 23 Dec 92 06:24:23 GMT
  8. References: <8970@lee.SEAS.UCLA.EDU>
  9. Sender: news@SEAS.UCLA.EDU
  10. Organization: U.C.L.A. Computer Aided Design Laboratory
  11. Lines: 29
  12.  
  13.  
  14. In article <8970@lee.SEAS.UCLA.EDU> you write:
  15. >Not that I mind only seeing Christmas posts, but, here is a Chanukah
  16. >post.  No, I dont feel that Chanukah is a major holiday (it isnt), but
  17. >playing dreidle can be fun, hence this program....
  18. >
  19. >Remember to link it with curses....
  20.  
  21. (or termlib or termcap btw)
  22.  
  23. OOPS!  I forgot that some UNIX rand() implementations are a little
  24. dain bramaged (SUN is known to be sad..)  and this can lead
  25. to rather dull games of dreidle.  I dont feel like posting a full
  26. patch as our AIX and HP/UX machines are fine.  
  27.  
  28. IF you really are compelled to play dreidle.c on your SUN 
  29. try the following:
  30.  
  31.      replace  
  32.                rand()%4  
  33.           with (rand()>>4)%4
  34.  
  35.      OR use a better rand function (drand48 perhaps?).
  36.  
  37. -- 
  38. qp HumanNet: Jonathan Katz          |   Computer Aided Design Laboratory     qp
  39. db AT&T-Net: (310)-825-7821         |_________     ---(*)---                 db
  40. qp Internet: jonathan@kanga.cad.ucla.edu      |______Do you read rec.humor?  qp
  41. db SnailNet: 38-138 Engineering IV, UCLA, LA, Ca, 90024|  No, frayed knot... db
  42.