wordle-shell
Version:
A Wordle for the command line
39 lines (30 loc) • 737 B
text/typescript
import inquirer from "inquirer";
import Game from "./Game";
import { Langs } from "./WordPicker";
const choices = Object.values(Langs);
function promptLang() {
}
inquirer.prompt([
{
type: "list",
name: "language",
message: "In what language do you want to play?",
choices: choices
}
]).then((anwser: { language: string; }) => {
let lang: Langs = Langs.enUs;
switch (anwser.language) {
case Langs.ptBr:
lang = Langs.ptBr;
break;
case Langs.enUs:
lang = Langs.enUs;
break;
default:
lang = Langs.enUs;
break;
}
const game = new Game(lang);
game.run();
});