Skip to main content
added 1 characters in body
Source Link
tmartin
  • 4k
  • 16
  • 16

K, 198

Assumes a dictionary d in the current working directory.

{O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9;i:1+S:0;while[#O;-1"Level ",$i;-1"=======";-1@*O;$[(**W)~0:0;[-1"correct";S+:10*+/"*"=*O];-1"wrong"];-1"score: ",$S;-1"";W:1_W;O:1_O;i+:1]} 

Ungolfed:

{ /W = wordlist; O = obfuscated O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9; i:1+S:0; while[#O; -1"Level ",$i; -1"======="; -1@*O; $[(**W)~0:0; /Read user input and compare to the first word [-1"correct"; S+:10*+/"*"=*O]; /if correct, increment score -1"wrong"]; -1"score: ",$S; -1""; W:1_W; /knock one off the top of both word lists O:1_O; i+:1] } 

K, 198

Assumes a dictionary d in the current working directory

{O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9;i:1+S:0;while[#O;-1"Level ",$i;-1"=======";-1@*O;$[(**W)~0:0;[-1"correct";S+:10*+/"*"=*O];-1"wrong"];-1"score: ",$S;-1"";W:1_W;O:1_O;i+:1]} 

Ungolfed:

{ /W = wordlist; O = obfuscated O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9; i:1+S:0; while[#O; -1"Level ",$i; -1"======="; -1@*O; $[(**W)~0:0; /Read user input and compare to the first word [-1"correct"; S+:10*+/"*"=*O]; /if correct, increment score -1"wrong"]; -1"score: ",$S; -1""; W:1_W; /knock one off the top of both word lists O:1_O; i+:1] } 

K, 198

Assumes a dictionary d in the current working directory.

{O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9;i:1+S:0;while[#O;-1"Level ",$i;-1"=======";-1@*O;$[(**W)~0:0;[-1"correct";S+:10*+/"*"=*O];-1"wrong"];-1"score: ",$S;-1"";W:1_W;O:1_O;i+:1]} 

Ungolfed:

{ /W = wordlist; O = obfuscated O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9; i:1+S:0; while[#O; -1"Level ",$i; -1"======="; -1@*O; $[(**W)~0:0; /Read user input and compare to the first word [-1"correct"; S+:10*+/"*"=*O]; /if correct, increment score -1"wrong"]; -1"score: ",$S; -1""; W:1_W; /knock one off the top of both word lists O:1_O; i+:1] } 
Source Link
tmartin
  • 4k
  • 16
  • 16

K, 198

Assumes a dictionary d in the current working directory

{O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9;i:1+S:0;while[#O;-1"Level ",$i;-1"=======";-1@*O;$[(**W)~0:0;[-1"correct";S+:10*+/"*"=*O];-1"wrong"];-1"score: ",$S;-1"";W:1_W;O:1_O;i+:1]} 

Ungolfed:

{ /W = wordlist; O = obfuscated O:{@[x;(-_c%3)?c:#x;:;"*"]}',/W:{1?x@&y=#:'x}[_0:`d]'4+!9; i:1+S:0; while[#O; -1"Level ",$i; -1"======="; -1@*O; $[(**W)~0:0; /Read user input and compare to the first word [-1"correct"; S+:10*+/"*"=*O]; /if correct, increment score -1"wrong"]; -1"score: ",$S; -1""; W:1_W; /knock one off the top of both word lists O:1_O; i+:1] }