home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!metro!usage!csdvax.csd.unsw.edu.au!p2112899
- From: p2112899@csdvax.csd.unsw.edu.au
- Newsgroups: comp.lang.pascal
- Subject: help with die rolls...
- Message-ID: <1992Dec16.170959.3637@csdvax.csd.unsw.edu.au>
- Date: 16 Dec 92 17:09:58 +1000
- Organization: University of New South Wales
- Lines: 18
-
- Could someone please show me how to get random die rolls going.
-
- I am writing an attribute program for a roll playing game and need to roll die
- for it.
-
- The code I have done is:
-
- for i := 0 to 3 do pe := pe + random(6);
-
- to roll a 6 sided die 3 times, but it doesn't work as it should. Some values
- produced are actually lower than possible.
-
- The minimum roll from 3 six sided die is 3, sometimes I get 2???
-
- Any help will be appreciated.
-
- Richard.
- P2112899@csdvax.csd.unsw.edu.au
-