This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Assume that all necessary packages are imported | |
public class EvilHangman implements HangmanInterface { | |
//Assume all private member variables including dictionary and letters guessed, | |
//num guesses, etc have been instantiated | |
private int guessesRemaining,wordLength; | |
//Now here's the important piece: we're going to have the EvilHangman game | |
//maintain a private, REGULAR hangman game. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async wait<T>(ms, value: T): Promise<T> { | |
return new Promise(resolve => setTimeout(resolve, ms, value)); | |
} |