1.1.2 • Published 4 years ago
game-rock-paper-scissor v1.1.2
Module can be used to play "Rock Paper Scissor" game. Use this Module to play game with computer.
function name : rockPaperScissor(argument);
Example:---
const rps = require('game-rock-paper-scissor'); //import custom created API for playing Rock Paper Scissor
let userChoice, results;
var rl = require('readline-sync');
userChoice = rl.question('Enter your choice Rock, Paper, Scissor : '); //Prompts for user Input
results = rps.RockPaperScissor(userChoice); //Compare User input with computer generated input
console.log(Your Choice :
, userChoice,' ',results);