Commit 938cfafe authored by Chris's avatar Chris
Browse files

refactored to put clear_held_values() into do_demo_dice_rolls() as this...

refactored to put clear_held_values() into do_demo_dice_rolls() as this functionality is tightly coupled
parent 1af2917a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ int main(void) {
	// do_demo_dice_rolls(&ctx, next_roll); // uncomment if you want to see a little demo

	if (selected_action == "newgame") {
		clear_held_values(&ctx); // part of demo/dice drawing
		do_demo_dice_rolls(&ctx, next_roll);
	}

@@ -114,6 +113,8 @@ int main(void) {
}

void do_demo_dice_rolls(game_context *ctx, unsigned int *next_roll) {
	clear_held_values(ctx);

	// first roll
	roll_and_print(ctx, next_roll, 0);