Hangman broken?

Hello,
I just stumbled on this file and its content :
/usr/share/icinga2/include/hangman

From what i can read of the commits in github, it is supposed to be a test script for ITL CmakeList
Sadly, it is not declared in global scope, and so cant be used in console for example.

Nice easter egg by the way :wink:

Hi,

I just tried the hangman easter egg in the latest version 2.12 and it worked. You have to include the hangman definitions first.

root@deb10i2m1:/# icinga2 console
Icinga 2 (version: r2.12.0-1)
Type $help to view available commands.
<1> => include <hangman>
null
<2> => hm.init("house")
null
<3> => hm.guess("a")
information/config: _ _ _ _ _ 
information/config: 1/7 errors made: A 
null
<4> => hm.guess("o")
information/config: _ O _ _ _ 
information/config: 1/7 errors made: A 
null
<5> => hm.guess("f")
information/config: _ O _ _ _ 
information/config: 2/7 errors made: A F 
null
<6> => hm.guess("u")
information/config: _ O U _ _ 
information/config: 2/7 errors made: A F 
null
<7> => hm.guess("s")
information/config: _ O U S _ 
information/config: 2/7 errors made: A F 
null
<8> => hm.guess("e")
information/config: _ O U S E 
information/config: 2/7 errors made: A F 
null
<9> => hm.guess("g")
information/config: _ O U S E 
information/config: 3/7 errors made: A F G 
null
<10> => hm.guess("b")
information/config: _ O U S E 
information/config: 4/7 errors made: A F G B 
null
<11> => hm.guess("h")
information/config: H O U S E 
information/config: 4/7 errors made: A F G B 
information/config: Congratulations, you are a winner in 9 guesses.
null

As far as I know this is solely an easter egg and not used in the unit tests.

Best regards
Michael

1 Like

oh ok, i missed it, thanks !