This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var debug = false | |
var counter, openPile; | |
//NEED WELCOME/INTRO | |
//create class of cards | |
function Card(rank, suit) { | |
this.rank = rank; | |
this.suit = suit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var owl, cat, whowins, winner; | |
whowins= prompt("Guess who will the tootsie pop contest, Owl or Cat?"); | |
function Animal(name, speed, focus){ | |
this.name= name; | |
this.speed=speed; | |
this.position=0; | |
this.focus= focus; | |
this.run= function(){ | |
if(Math.random() *10 < this.focus) { |