Choices complete, prep for merge into master

This commit is contained in:
2022-01-20 10:52:32 -06:00
parent e0e54bd34b
commit 5b53c8e18b
3 changed files with 74 additions and 24 deletions

View File

@@ -35,12 +35,16 @@ int main() {
storybook_advance_nooption(book);
break;
case (FOOTER_CHOICES):
int n = storybook_get_num_choices(book);
for (int i = 1; i <= n; i++) {
Choice* choice = storybook_get_choice(book, i);
printf("%d) %s\n", choice->option, choice->flavor);
storybook_free_choice(choice);
ChoiceList *list = storybook_get_choices(book);
for (ChoiceList *curr = list; curr; curr = curr->next) {
const StatCheck *sk = curr->choice.statcheck;
if (sk) {
printf("\e[0;31m");
}
printf("%d) %s", curr->choice.option, curr->choice.flavor);
printf("\n\e[0m");
}
storybook_free_choices(list);
uint32_t option;
printf("Make a choice: ");
scanf("%d", &option);