phyver / GameShell

a game to learn (or teach) how to use standard commands in a Unix shell
GNU General Public License v3.0
2.18k stars 140 forks source link

Problem for ending mission 11 #59

Closed sbonnegent closed 3 years ago

sbonnegent commented 3 years ago

Hi, First, thanks for this work, it will be very usefull for newbies :)

I have a problem with mission 11, 'gsh check' command remains blocked: ` ~/Chateau/Grande_salle [mission 11] $ cp tapisserie ../../Foret/Hutte/Coffre/

~/Chateau/Grande_salle [mission 11] $ gsh check

Bravo, vous avez réussi la mission 11 !

`

I can do 'ctrl-c' to interrupt but another 'gsh check' gives 'failed'.

phyver commented 3 years ago

So, gsh check loops, ^c interrupts it and gives the message Bravo, vous avez réussi la mission 11 ! Is that right? Do you end up at the mission 12, or back at mission 11?

Can you give me the output of

[mission ?] $ gsh systemconfig

Can you reproduce it from a clean game? Something like,

$ ./gameshell.sh
[mission 1] $ gsh goto 11
# password is gsh
[mission 11] $ ...
[mission 11[ $ ...
[mission 11] $ gsh check
sbonnegent commented 3 years ago

gsh check loops after Bravo, vous avez réussi la mission 11 ! (not before). So I can't go to mission 12. I can reprodure it from a clean game but I can't use gsh goto 12 (11 and 13 work normally).

[mission 11] $ gsh systemconfig
=========================
GSH_SHELL=/bin/zsh
version
zsh 5.8 (x86_64-ubuntu-linux-gnu)
=========================
uname -a
Linux saturne 5.11.0-22-generic #23-Ubuntu SMP Thu Jun 17 00:34:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
=========================
awk --version
mawk 1.3.4 20200120
=========================
locale
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
=========================
phyver commented 3 years ago

OK, I tracked the problem down. It comes from the internal pseudo random generator used in mawk. (I don't really know more at the moment.)

Commit 2d95c92333fbec14ca29719f1d13d0d417ce6276 should have fixed the problem.

Can you confirm?

sbonnegent commented 3 years ago

Perfect, it works !

Thank you :)

Aierbote commented 2 years ago

Don't mind my 👀 eyes emoji reaction in a comment above.

I was looking for this password 🤭😁