Sunday, July 18, 2021

TI-84 Plus CE: Rolling Fate Dice

 TI-84 Plus CE: Rolling Fate Dice 



Fate Dice:  Evil Hat Productions

Website:  https://www.evilhat.com/home/fate-dice/


Roll Your Fate!


Fate Dice, a fudge dice, are used in many role-playing games.  The dice pictured above is just one variety of fudge dice used.   These Fate Dice are four six-sided dice consisting of two pluses, two blanks, and two minuses on each die.


Therefore, on a single roll of a die, the roller has 1/3 chance of getting a plus, blank, or minus on each roll.  The program FATEDICE below takes this account and uses a random number generator between -1 (for minus), 0 (for blank), and 1 (for plus).  The program draws the result of the four dice on the graphic screen.   


The resulting graphic screen has the following parameters:


* All functions and plots turned off.

* All drawing is cleared.

* Xmin = 0, Xmax = 13, Xscl = 1 (x scale)

* Ymin = 0, Ymax = 7,  Yscl = 1 (y scale)


 TI-84 Plus CE Program:  ROLLFATE

Version 5.x or higher required (Wait command)


"EWS 2021-05-15"

ClrHome

Disp "FATE DICE"

FnOff 

PlotsOff 

randInt(­1,1,4)→L₆

Disp "ROLLING..."

Wait .5

ClrDraw

0→Xmin:13→Xmax:1→Xscl

0→Ymin:7→Ymax:1→Yscl

For(I,1,10,3)

(I+2)/3→J

Line(I,3,I+2,3,NAVY)

Line(I,1,I+2,1,NAVY)

Line(I,3,I,1,NAVY)

Line(I+2,3,I+2,1,NAVY)

If abs(L₆(J))=1

Line(I+.5,2,I+1.5,2,GREEN)

If L₆(J)=1

Line(I+1,2.5,I+1,1.5,GREEN)

End

TextColor(BLUE)

Text(10,10,"HERE IS YOUR ROLL:")



Eddie


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


TI 84 Plus CE: Consolidated Debts

TI 84 Plus CE: Consolidated Debts   Disclaimer: This blog is for informational and academic purposes only. Financial decisions are your ...