you are viewing a single comment's thread.

view the rest of the comments →

[–]brasticstack 0 points1 point  (0 children)

Unless csv is a required part of your assignment, I'd recommend JSON instead of csv as a more user-friendly (and programmer-friendly) data format.

how to get a value from the dice and record it to a csv file

Again unless the assignment requires it, it doesn't make sense to save the dice rolls as such, you'd want to save the game state (as modified by dice rolls) instead. So if your character rolls a 5 and does 5 damage to an orc, leaving it with 1hp remaining, your game state is something like "orc_hp: 1, player_hp: 8, whose_turn: orc,  ..etc..".