bad-uno

0.0.2 • Public • Published

Hey look, it's UNO™!

It kinda provides uno. It's not very automatic, but whatever.

const uno = require('bad-uno');
 
const game = new uno(2);
 
let interval = setInterval(()=>{
  for(i=0;i<game.hands.length;i++) if(game.hands[i].length == 0) {
    clearInterval(interval);
    console.log("Player " + (i+1) + " wins!");
  }
  
  if(game.draw || game.hands[game.turn].every(x=>game.play(game.turn, x, 'r'))) return game.pull(game.turn);
  console.log("Player " + (game.turn + 1) + " plays " + game.top + "!"); 
}, 1000);

Readme

Keywords

Package Sidebar

Install

npm i bad-uno

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • arandompieceofcheese