1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-25 15:46:39 +09:00
This commit is contained in:
syuilo 2017-10-08 12:09:10 +09:00
parent 27102094c8
commit 9f6f616ecc

View File

@ -295,11 +295,15 @@ class GuessingGameContext extends Context {
return 'やめました。';
}
const guess = parseInt(query, 10);
if (isNaN(guess)) {
return '整数で推測してください。「やめる」と言うとゲームをやめます。';
}
this.try++;
this.emit('updated');
const guess = parseInt(query, 10);
if (this.secret < guess) {
return `${guess}よりも小さいですね`;
} else if (this.secret > guess) {