PLAYER0 is the human player PLAYER1 is the computer (smart) 1. starts with the current word string 2. searches dictionary to find all the possible words extending from this current word string, puts these into a list 3. randomly chooses one of these next possible words from this list 4. picks the next letter from this new word chosen from the list 5. also checks for possible challenge conditions: - if word string is a word in the dictionary - if there are no words that can extend from word string returns "!" as the new letter, to signify a challenge ruby ghost02.rb numplayers= 2 New word to pick Player 0 pick a letter (HUMAN) Current word=, Letter? a Current word: ["a"], string: a Player 1 pick a letter (COMPUTER) Computer adding to a Current word: ["a", "l"], string: al Player 0 pick a letter (HUMAN) Current word=al, Letter? b Current word: ["a", "l", "b"], string: alb Player 1 pick a letter (COMPUTER) Computer adding to alb Current word: ["a", "l", "b", "u"], string: albu Player 0 pick a letter (HUMAN) Current word=albu, Letter? m Current word: ["a", "l", "b", "u", "m"], string: album album found at position 1128 Player 1 pick a letter (COMPUTER) Current word: album album found at position 1128, return "!" Challenge issued, player 0 has ["G"], all players: [["G"], []] THE HUMAN HAS 1 LETTER: "G" New word to pick Player 0 pick a letter (HUMAN) Current word=, Letter? a Current word: ["a"], string: a Player 1 pick a letter (COMPUTER) Computer adding to a Current word: ["a", "s"], string: as as found at position 2381 (THIS IS A WORD, BUT NOT 4 LETTERS LONG) Player 0 pick a letter (HUMAN) Current word=as, Letter? p Current word: ["a", "s", "p"], string: asp asp found at position 2433 (THIS IS A WORD, BUT NOT 4 LETTERS LONG) Player 1 pick a letter (COMPUTER) Computer adding to asp Current word: ["a", "s", "p", "i"], string: aspi Player 0 pick a letter (HUMAN) Current word=aspi, Letter? r Current word: ["a", "s", "p", "i", "r"], string: aspir Player 1 pick a letter (COMPUTER) Computer adding to aspir Current word: ["a", "s", "p", "i", "r", "a"], string: aspira aspira not found Player 0 pick a letter (HUMAN) Current word=aspira, Letter? t Current word: ["a", "s", "p", "i", "r", "a", "t"], string: aspirat aspirat not found Player 1 pick a letter (COMPUTER) Computer adding to aspirat Current word: ["a", "s", "p", "i", "r", "a", "t", "i"], string: aspirati aspirati not found Player 0 pick a letter (HUMAN) Current word=aspirati, Letter? o Current word: ["a", "s", "p", "i", "r", "a", "t", "i", "o"], string: aspiratio aspiratio not found Player 1 pick a letter (COMPUTER) Computer adding to aspiratio Current word: ["a", "s", "p", "i", "r", "a", "t", "i", "o", "n"], string: aspira tion aspiration found at position 2449 Player 0 pick a letter (HUMAN - CHALLENGE WITH "!") Current word=aspiration, Letter? ! Current word: aspiration aspiration found at position 2449 Challenge issued, player 1 has ["G"], all players: [["G"], ["G"]] NOW BOTH PLAYERS HAVE 1 LETTER, "G" New word to pick Player 1 pick a letter (COMPUTER) Computer adding to Current word: ["a"], string: a a not found Player 0 pick a letter (HUMAN) Current word=a, Letter? ...