uno
uno copied to clipboard
game.uno() throws error for non current players
I tried the following code:
const {
Card, Game,
} = require('uno-engine-updated');
const game = new Game(['1', '2', '3']);
The current player is 3 and when I try to run:
game.uno('2')
I get an error like this:
TypeError: Cannot read property 'length' of undefined
The error is from game.js
line 217
if (yellingPlayer.hand.length <= 2 && !this.yellers[yellingPlayer.name]) {
this.yellers[yellingPlayer.name] = true;
return [];
}
Please let me know what is the issue here. Is it something expected from the package.