From 17d426337e4217fc1d490bf447d15213fab44abf Mon Sep 17 00:00:00 2001 From: terceranexus6 Date: Fri, 27 Jan 2023 16:48:56 +0100 Subject: [PATCH] partially fixed yesterday mess --- MYDATA/{TESTING3 => PAULA}/BACKPACK | 1 + MYDATA/PAULA/CHARACTER_DETAILS | 2 + MYDATA/PAULA/NOTES_AND_COORDINATES | 13 ++ .../SAVING_CARTRIDGE_PAULA} | 0 MYDATA/PAULA/been_there_done_that | 3 + .../{TESTING3/TESTING3 => PAULA}/chosen_maps | 0 MYDATA/TESTING3/CHARACTER_DETAILS | 2 - MYDATA/TESTING3/NOTES_AND_COORDINATES | 13 -- MYDATA/TESTING3/SAVING_CARTRIDGE_TESTING3 | 1 - MYDATA/TESTING3/TESTING3/BACKPACK | 18 --- MYDATA/TESTING3/TESTING3/CHARACTER_DETAILS | 2 - .../TESTING3/TESTING3/NOTES_AND_COORDINATES | 13 -- MYDATA/TESTING3/TESTING3/been_there_done_that | 3 - game.sh | 122 +++++++----------- 14 files changed, 69 insertions(+), 124 deletions(-) rename MYDATA/{TESTING3 => PAULA}/BACKPACK (90%) create mode 100644 MYDATA/PAULA/CHARACTER_DETAILS create mode 100644 MYDATA/PAULA/NOTES_AND_COORDINATES rename MYDATA/{TESTING3/TESTING3/SAVING_CARTRIDGE_TESTING3 => PAULA/SAVING_CARTRIDGE_PAULA} (100%) create mode 100644 MYDATA/PAULA/been_there_done_that rename MYDATA/{TESTING3/TESTING3 => PAULA}/chosen_maps (100%) delete mode 100644 MYDATA/TESTING3/CHARACTER_DETAILS delete mode 100644 MYDATA/TESTING3/NOTES_AND_COORDINATES delete mode 100644 MYDATA/TESTING3/SAVING_CARTRIDGE_TESTING3 delete mode 100644 MYDATA/TESTING3/TESTING3/BACKPACK delete mode 100644 MYDATA/TESTING3/TESTING3/CHARACTER_DETAILS delete mode 100644 MYDATA/TESTING3/TESTING3/NOTES_AND_COORDINATES delete mode 100644 MYDATA/TESTING3/TESTING3/been_there_done_that diff --git a/MYDATA/TESTING3/BACKPACK b/MYDATA/PAULA/BACKPACK similarity index 90% rename from MYDATA/TESTING3/BACKPACK rename to MYDATA/PAULA/BACKPACK index 61277d7..99c79b4 100644 --- a/MYDATA/TESTING3/BACKPACK +++ b/MYDATA/PAULA/BACKPACK @@ -7,3 +7,4 @@ Solar Laptop Food packets Clothes Camera +black device diff --git a/MYDATA/PAULA/CHARACTER_DETAILS b/MYDATA/PAULA/CHARACTER_DETAILS new file mode 100644 index 0000000..01cf3e1 --- /dev/null +++ b/MYDATA/PAULA/CHARACTER_DETAILS @@ -0,0 +1,2 @@ +PAULA +2 diff --git a/MYDATA/PAULA/NOTES_AND_COORDINATES b/MYDATA/PAULA/NOTES_AND_COORDINATES new file mode 100644 index 0000000..4d43639 --- /dev/null +++ b/MYDATA/PAULA/NOTES_AND_COORDINATES @@ -0,0 +1,13 @@ +COORDINATES +A. +X: 363 +Y: 330 +B. +769 +49 +C. +815 +205 +D. +397 +365 diff --git a/MYDATA/TESTING3/TESTING3/SAVING_CARTRIDGE_TESTING3 b/MYDATA/PAULA/SAVING_CARTRIDGE_PAULA similarity index 100% rename from MYDATA/TESTING3/TESTING3/SAVING_CARTRIDGE_TESTING3 rename to MYDATA/PAULA/SAVING_CARTRIDGE_PAULA diff --git a/MYDATA/PAULA/been_there_done_that b/MYDATA/PAULA/been_there_done_that new file mode 100644 index 0000000..a6df7e7 --- /dev/null +++ b/MYDATA/PAULA/been_there_done_that @@ -0,0 +1,3 @@ +MAP_A +MAP_B +MAP_C diff --git a/MYDATA/TESTING3/TESTING3/chosen_maps b/MYDATA/PAULA/chosen_maps similarity index 100% rename from MYDATA/TESTING3/TESTING3/chosen_maps rename to MYDATA/PAULA/chosen_maps diff --git a/MYDATA/TESTING3/CHARACTER_DETAILS b/MYDATA/TESTING3/CHARACTER_DETAILS deleted file mode 100644 index 6f18134..0000000 --- a/MYDATA/TESTING3/CHARACTER_DETAILS +++ /dev/null @@ -1,2 +0,0 @@ -TESTING3 -2 diff --git a/MYDATA/TESTING3/NOTES_AND_COORDINATES b/MYDATA/TESTING3/NOTES_AND_COORDINATES deleted file mode 100644 index 9a87bc6..0000000 --- a/MYDATA/TESTING3/NOTES_AND_COORDINATES +++ /dev/null @@ -1,13 +0,0 @@ -COORDINATES -A. -X: 412 -Y: 11 -B. -420 -972 -C. -68 -516 -D. -702 -584 diff --git a/MYDATA/TESTING3/SAVING_CARTRIDGE_TESTING3 b/MYDATA/TESTING3/SAVING_CARTRIDGE_TESTING3 deleted file mode 100644 index 0bd15e7..0000000 --- a/MYDATA/TESTING3/SAVING_CARTRIDGE_TESTING3 +++ /dev/null @@ -1 +0,0 @@ -episode2 diff --git a/MYDATA/TESTING3/TESTING3/BACKPACK b/MYDATA/TESTING3/TESTING3/BACKPACK deleted file mode 100644 index aa53485..0000000 --- a/MYDATA/TESTING3/TESTING3/BACKPACK +++ /dev/null @@ -1,18 +0,0 @@ -Chillies -Electronic music cassettes - -Epaper notebook -Notes from the previous researchers -Solar Laptop -Food packets -Clothes -Camera -Chillies -Electronic music cassettes - -Epaper notebook -Notes from the previous researchers -Solar Laptop -Food packets -Clothes -Camera diff --git a/MYDATA/TESTING3/TESTING3/CHARACTER_DETAILS b/MYDATA/TESTING3/TESTING3/CHARACTER_DETAILS deleted file mode 100644 index 6f18134..0000000 --- a/MYDATA/TESTING3/TESTING3/CHARACTER_DETAILS +++ /dev/null @@ -1,2 +0,0 @@ -TESTING3 -2 diff --git a/MYDATA/TESTING3/TESTING3/NOTES_AND_COORDINATES b/MYDATA/TESTING3/TESTING3/NOTES_AND_COORDINATES deleted file mode 100644 index 658f627..0000000 --- a/MYDATA/TESTING3/TESTING3/NOTES_AND_COORDINATES +++ /dev/null @@ -1,13 +0,0 @@ -COORDINATES -A. -X: 866 -Y: 622 -B. -101 -791 -C. -180 -8 -D. -837 -262 diff --git a/MYDATA/TESTING3/TESTING3/been_there_done_that b/MYDATA/TESTING3/TESTING3/been_there_done_that deleted file mode 100644 index 881c89b..0000000 --- a/MYDATA/TESTING3/TESTING3/been_there_done_that +++ /dev/null @@ -1,3 +0,0 @@ -MAP_B -MAP_B -MAP_B diff --git a/game.sh b/game.sh index 44ba5b5..52e16c0 100755 --- a/game.sh +++ b/game.sh @@ -31,6 +31,13 @@ debug_this(){ read -p"continue?" dummy } +clean_stuff(){ + touch been_there_done_that2 + echo "****" >> been_there_done_that2 + awk '!a[$0]++' been_there_done_that > been_there_done_that2 + mv been_there_done_that2 been_there_done_that +} + save_it(){ episode="$1" NAME="$2" @@ -141,6 +148,7 @@ episode1(){ echo -e "$SPA_C So, there you are $NAME, almost in the moon. Who would have tell you?\n$SPA_C It's not a big deal, actually, anyone can ask for a trip in order\n$SPA_C to research up there, but then again who wants that?" echo -e "\n$SPA_C They needed a linguist expert who, at the same time, understood\n$SPA_C some basic electronics.\n\n$SPA_C The reasons remain a mystery. Let's go, for science." continue_ + save_it "episode2" "$NAME" episode2 "$PERSONALITY" "$NAME" } @@ -187,7 +195,7 @@ episode2(){ read -p"$SPA_C YOUR ANSWER > " LOOKNOW echo -e "${NC}\n" - debug_this "go on is $go_on and LOOKNOW is $LOOKNOW" + #debug_this "go on is $go_on and LOOKNOW is $LOOKNOW" populate_notes @@ -227,7 +235,7 @@ episode2(){ continue_ - echo "episode3" > SAVING_CARTRIDGE_$NAME + save_it "episode3" "$NAME" episode3 $PERSONALITY $NAME } @@ -277,7 +285,7 @@ episode3(){ if [ "$CHOICE1" = "A" ]; then clear echo -e "$SPACE" - echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n$SPA_C You carefully write the coordinates and get ready!\n\n" + echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n$SPA_C You carefully write the coordinates and get ready!\n\n" echo -e "${blue}" continue_ go_on="yes" @@ -286,7 +294,7 @@ episode3(){ elif [ "$CHOICE1" = "B" ]; then clear echo -e "$SPACE" - echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n$SPA_C You carefully write the coordinates and get ready!\n\n" + echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n$SPA_C You carefully write the coordinates and get ready!\n\n" echo -e "${blue}" continue_ go_on="yes" @@ -295,7 +303,7 @@ episode3(){ elif [ "$CHOICE1" = "C" ]; then clear echo -e "$SPACE" - echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n$SPA_C You carefully write the coordinates and get ready!\n\n" + echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n$SPA_C You carefully write the coordinates and get ready!\n\n" echo -e "${blue}" continue_ go_on="yes" @@ -304,7 +312,7 @@ episode3(){ elif [ "$CHOICE1" = "D" ]; then clear echo -e "$SPACE" - echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n $SPA_C You carefully write the coordinates and get ready!\n\n" + echo -e "$SPA_C You close the paper notebook and open the e-paper notebook using the MAP mode.\n $SPA_C You carefully write the coordinates and get ready!\n\n" echo -e "${blue}" continue_ go_on="yes" @@ -326,7 +334,7 @@ episode3(){ # echo "name is $NAME" - echo "episode4" > SAVING_CARTRIDGE_$NAME + save_it "episode4" "$NAME" #cat SAVING_CARTRIDGE_$NAME @@ -411,11 +419,11 @@ episode4(){ fi else #do nothing - echo "You aren't in the headspace to test your luck right now. You just keep going, crunching the snow \n$SPA_C under your feet." + echo -e "$SPA_C You aren't in the headspace to test your luck right now. You just keep going, crunching the snow \n$SPA_C under your feet." fi echo -e "\n\n" continue_ - echo "episode5" > SAVING_CARTRIDGE_$NAME + save_it "episode5" "$NAME" where_from="nowhere" episode5 $PERSONALITY $NAME $where_from @@ -429,68 +437,22 @@ episode5(){ NAME=$2 COOR=$3 - echo -e "$SPA_C ${blue}Where should you go now?${NC}" - cat NOTES_AND_COORDINATES - - echo -e "\n\n$SPA_C 1- coor A\n$SPA_C 2- coor B\n$SPA_C 3- coor C\n$SPA_C 4- coor D\n\n" - - echo -e "${bli_blue}" - read -p"$SPA_C YOUR ANSWER > " NEWCOOR - echo -e "${NC}" - - go_on="nope" - - while [ "$go_on" == "nope" ]; do - - - - if [ "$NEWCOOR" == "$COOR" ]; then - clear - echo -e "$SPACE" - echo -e "$SPA_C Already there!\n\n" + NEWCOOR=$(cat chosen_maps) - echo -e "\n\n$SPA_C 1- coor A\n$SPA_C 2- coor B" - echo -e "$SPA_C 3- coor C" - echo -e "$SPA_C 4- coor D\n\n" + where_from="$NEWCOOR" - echo -e "${bli_blue}" - read -p"$SPA_C YOUR ANSWER > " NEWCOOR - echo -e "${NC}" - else - - if [ "$NEWCOOR" == "1" ]; then - echo "$SPA_C Saving option, going to coor A" - go_on="yep" - SCENARY_A "ep5" + #debug_this "NEWCOOR is $NEWCOOR" - elif [ "$NEWCOOR" == "2" ]; then - echo "$SPA_C Saving option, going to coor B" - go_on="yep" - SCENARY_B "ep5" - - elif [ "$NEWCOOR" == "3" ]; then - echo "$SPA_C Saving option, going to coor C" - go_on="yep" - SCENARY_C "ep5" - - elif [ "$NEWCOOR" == "4" ]; then - echo "$SPA_C Saving option, going to coor D" - go_on="yep" - SCENARY_D "ep5" - - else - clear - echo -e "$SPACE" - echo -e "$SPA_C What again?" - echo -e "\n\n$SPA_C 1- coor A\n$SPA_C 2- coor B\n$SPA_C 3- coor C\n$SPA_C D- coor D\n\n" - - echo -e "${bli_blue}" - read -p"$SPA_C YOUR ANSWER > " NEWCOOR - echo -e "${NC}" - fi - - fi - done + if [ "$NEWCOOR" == "MAP_A" ]; then + SCENARY_A + elif [ "$NEWCOOR" == "MAP_B" ]; then + SCENARY_B + elif [ "$NEWCOOR" == "MAP_C" ]; then + SCENARY_C + elif [ "$NEWCOOR" == "MAP_D" ]; then + SCENARY_D + fi + clear echo -e "$SPACE" @@ -505,7 +467,8 @@ episode6(){ PERSONALITY=$1 NAME=$2 - COOR=$3 + + COOR=$(cat chosen_maps) clear echo -e "$SPACE" @@ -697,6 +660,7 @@ SCENARY_B(){ ep="$1" thisc="2" + #clear #echo -e "$SPACE" @@ -749,9 +713,7 @@ SCENARY_B(){ #you could have taken it or not while read -r line2; do - if [ "$line2" == "SCENARY_C" ]; then - echo -e "$SPA_C Maybe it's better to just get going then." - else + if [ "$line2" == "MAP_C" ] ; then echo -e "$SPA_C maybe... I mean maybe it just changed. But what if... I could send " echo -e "$SPA_C a radio signal?" fi @@ -762,6 +724,9 @@ SCENARY_B(){ echo "MAP_B" >> been_there_done_that echo "MAP_B" > chosen_maps + #delete repeated been there done that + clean_stuff + @@ -878,6 +843,11 @@ SCENARY_A(){ echo "MAP_A" >> been_there_done_that echo "MAP_A" > chosen_maps + #delete repeated been there done that + clean_stuff + + + #save the episode #echo "$SPACE" #echo "$SPA_C Data successfully saved in the cartridge." @@ -1218,15 +1188,23 @@ select_map(){ if [ "$1" == "A" ]; then echo -e "$SPA_C The coordinates are ${coor_A[0]} and ${coor_A[1]}\n\n" cat ../$mapA + echo "MAP_A" > chosen_maps + elif [ "$1" == "B" ]; then echo -e "$SPA_C The coordinates are ${coor_B[0]} and ${coor_B[1]}\n\n" cat ../$mapB + echo "MAP_B" > chosen_maps + elif [ "$1" == "C" ]; then echo -e "$SPA_C The coordinates are ${coor_C[0]} and ${coor_C[1]}\n\n" cat ../$mapC + echo "MAP_C" > chosen_maps + elif [ "$1" == "D" ]; then echo -e "$SPA_C The coordinates are ${coor_D[0]} and ${coor_D[1]}\n\n" cat ../$mapD + echo "MAP_D" > chosen_maps + fi } -- 2.45.2