From e801a66b084db4c2c36e25094a95a0fbb5ca73b1 Mon Sep 17 00:00:00 2001 From: terceranexus6 Date: Fri, 27 Jan 2023 18:47:50 +0100 Subject: [PATCH] fixing the same as before --- MYDATA/PAULA/been_there_done_that | 1 + MYDATA/PAULA/chosen_maps | 2 +- game.sh | 40 ++++++++++++++++++++++++------- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/MYDATA/PAULA/been_there_done_that b/MYDATA/PAULA/been_there_done_that index 7a171f3..965e695 100644 --- a/MYDATA/PAULA/been_there_done_that +++ b/MYDATA/PAULA/been_there_done_that @@ -1 +1,2 @@ MAP_A +MAP_B diff --git a/MYDATA/PAULA/chosen_maps b/MYDATA/PAULA/chosen_maps index 4738de6..7a171f3 100644 --- a/MYDATA/PAULA/chosen_maps +++ b/MYDATA/PAULA/chosen_maps @@ -1 +1 @@ -MAP_B +MAP_A diff --git a/game.sh b/game.sh index f075d4a..43b8bd6 100755 --- a/game.sh +++ b/game.sh @@ -68,8 +68,13 @@ change_place(){ current="$current2" #debug_this "current is $current" new_coor="" + dont_go_here="no" - + while read -r line2; do + if [ "$line2" == "MAP_B" ]; then + dont_go_here="yes" + fi + done < been_there_done_that #try_again="yes" @@ -96,18 +101,34 @@ change_place(){ clean echo -e "$SPACE" echo -e "$SPA_c Oops! you are already there, try again.\n" + while read -r line; do - echo -e "$SPA_C $line" - done < NOTES_AND_COORDINATES + echo -e "$SPA_C $line" + done < NOTES_AND_COORDINATES - echo -e "$SPA_C Which are the coordinates you want to go?" - echo -e "$SPA_C Select among: A, B, C, D" + echo -e "$SPA_C Which are the coordinates you want to go?" + echo -e "$SPA_C Select among: A, B, C, D" - echo -e "${bli_blue}" - read -p"$SPA_C YOUR ANSWER > " CHOICE1 - echo -e "${NC}" + echo -e "${bli_blue}" + read -p"$SPA_C YOUR ANSWER > " CHOICE1 + echo -e "${NC}" #debug_this "you are currently in $current and are about to choose going to $CHOICE1" + elif [ "$dont_go_here" == "yes" ]; then + clean + echo -e "$SPACE" + echo -e "There's nothing else to see there, you made very sure of it! Maybe choose another place:\n\n" + dont_go_here="no" + while read -r line; do + echo -e "$SPA_C $line" + done < NOTES_AND_COORDINATES + + echo -e "$SPA_C Which are the coordinates you want to go?" + echo -e "$SPA_C Select among: A, B, C, D" + + echo -e "${bli_blue}" + read -p"$SPA_C YOUR ANSWER > " CHOICE1 + echo -e "${NC}" else if [ "$CHOICE1" = "A" ]; then @@ -913,9 +934,10 @@ SCENARY_A(){ else - echo -e "$SPA_C There's nothing else here to check.\n\n" + echo -e "$SPA_C There's nothing else here to check in this area, you made sure of that.\n\n" continue_ + fi -- 2.45.2