Added Hunt (hangman) game.

This commit is contained in:
Niels Simenon
2022-10-30 04:21:32 +01:00
parent cb2fa362d6
commit b4add9e11d
9 changed files with 1970 additions and 3 deletions

20
src/games/parrot.js Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
const Markov = require('markov-strings').default;
const sentences = require('../../assets/markov-data.json');
const markov = new Markov();
markov.addData(sentences);
function onCommand(args, context) {
const result = markov.generate({ maxTries: 100 });
console.log(result);
context.sendMessage(result.string, context.room.id);
}
module.exports = {
onCommand,
};