{"size": 837, "ext": "js", "max_stars_repo_path": "assets/js/rockpaperscissors.min.js", "max_stars_repo_name": "yogski/yogski.github.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/rockpaperscissors.min.js", "max_issues_repo_name": "yogski/yogski.github.io", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/rockpaperscissors.min.js", "max_forks_repo_name": "yogski/yogski.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 837.0, "max_line_length": 837, "alphanum_fraction": 0.7395459976}
const suits=["rock","paper","scissors"],results=["Draw","You Win","Opponent Wins"];var gameState=0;function resetGame(){const e=document.getElementById("figure-result");document.querySelectorAll(".opponent-area .figure").forEach(e=>{e.style.border="1px solid transparent"}),e.style.display="none",gameState=0}function playGame(e){const t=document.getElementById("figure-result");if(0==gameState){const s=Math.floor(Math.random()*suits.length),r=suits[s],o=document.querySelectorAll(".opponent-area .figure");o[s].style.border="1px solid maroon",o[s].style.borderRadius="7.5%",t.innerHTML=results[compareSuits(e,r)],t.style.display="block",gameState=1}else t.innerHTML="Restart game first.",t.style.display="block"}function compareSuits(e,t){return e===t?0:"rock"==e&&"scissors"==t?1:"scissors"==e&&"paper"==t?1:"paper"==e&&"rock"==t?1:2}