Loading yaht.c +1 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ int main(void) { while (can_continue_playing(&ctx.game_state.scorecard) && !game_over) { game_over = take_turn(&ctx, NUM_DICE); } printf("Your final score was %d.\nThank you for playing!\n", printf("Your final score was %d.\n\n", calculate_total_score(&ctx.game_state.scorecard)); break; case RULES: Loading Loading @@ -126,8 +126,6 @@ unsigned int take_turn(game_context *ctx, unsigned int num_dice) { return 0; // 0 signifies user_quit == false, which will move on to the next turn } case QUIT: // todo this could be more robust or interactive. maybe add the final score? // also you could maybe ask to start a new game or to quit the program return 1; // 1 signifies user_quit == true, which will end the game default: break; Loading Loading
yaht.c +1 −3 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ int main(void) { while (can_continue_playing(&ctx.game_state.scorecard) && !game_over) { game_over = take_turn(&ctx, NUM_DICE); } printf("Your final score was %d.\nThank you for playing!\n", printf("Your final score was %d.\n\n", calculate_total_score(&ctx.game_state.scorecard)); break; case RULES: Loading Loading @@ -126,8 +126,6 @@ unsigned int take_turn(game_context *ctx, unsigned int num_dice) { return 0; // 0 signifies user_quit == false, which will move on to the next turn } case QUIT: // todo this could be more robust or interactive. maybe add the final score? // also you could maybe ask to start a new game or to quit the program return 1; // 1 signifies user_quit == true, which will end the game default: break; Loading