;--<< Play a game of dice. pro dice playagain=1 while playagain eq 1 do begin print, 'Roll die? (Y/N)' qroll='' read,qroll if strlowcase(qroll) eq 'y' then begin myroll = round(randomu(seed)*5)+1 opproll = round(randomu(seed)*5)+1 print,'Rolling DICE!' wait,1 print,' ' print,'You rolled a '+strcompress(myroll,/remo) print,' ' wait,1 print,'Your opponent rolled a '+strcompress(opproll,/remo) print,' ' wait,1 case 1 of myroll gt opproll: msg='You WIN!' myroll eq opproll: msg='A TIE!' myroll lt opproll: msg='You LOSE!' endcase print,msg qagain='' print,' ' print,'Play Again? (Y/N)' read,qagain if strlowcase(qagain) ne 'y' then playagain=0 endif if strlowcase(qroll) ne 'y' then break endwhile print,'Goodbye!' end