We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cf7886e + 9c30be2 commit 1dfdb04Copy full SHA for 1dfdb04
functions/shiritori/main.js
@@ -33,25 +33,25 @@ rl.prompt()
33
shiritori.loaded.then(() => {
34
rl.on('line', (input) => {
35
shiritori.interact(kana => Promise.resolve(
36
- corpus[kana]), input, previousInputs, {
37
- win (word, kana) {
+ corpus[kana]), input, previousInputs, {
+ win (word, kana) {
38
if (word) {
39
console.log(`${word} [${kana}]`)
40
} else {
41
console.log('すごい!')
42
}
43
process.exit(0)
44
- },
45
- lose () {
+ },
+ lose () {
46
console.log('ざんねん。')
47
process.exit(-1)
48
49
- next (word, kana) {
+ next (word, kana) {
50
inputs.unshift(input)
51
inputs.unshift(kana)
52
53
rl.prompt()
54
- }
55
- })
+ }
+ })
56
})
57
0 commit comments