Last active
December 16, 2015 02:29
-
-
Save cxytomo/5362617 to your computer and use it in GitHub Desktop.
This file contains 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
var canv = document.getElementById('game') | |
, contxt = canv.getContext('2d') | |
, guess = 3 //猜测的次数 | |
, message = "Guess The Letter From a(lower) to z(higher)"//游戏提示 | |
, letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] | |
, today = new Date()//日期显示 | |
, letterToGuess = ""//系统随机产生的待猜测的字母 | |
, letterToGArray = []//游戏结束时,用于显示待猜测字母 | |
, LowerOrHigher = ""//每次键按下后对用户提示 | |
, lettersGuessed//存放已经按过的字母 | |
, index//待猜测字母在letters数组中的索引值 | |
, game = false;//用户猜测成功后为true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment