Skip to content

wobbol/dice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libdiceroll - need to roll 100d61? no problem.

!video

Take a look at example.c to see it in action.

API overview:

diceroll_init() - Start. Idempotent. diceroll_finish() - Cleanup. Idempotent.

diceroll_parse() - Digest dice-roll string. return 0, dice_error is set. return 1, ready to roll.

diceroll_rtd() - Roll the dice. return > 0, a diceroll. return 0, dice is finished.

diceroll_perror() - Prints given string, then the dice error. diceroll_strerror() - Return library error string.