Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
Sept. 6, 2016, 12:55 a.m.
FORMAT:
Text only
SIZE:
591 Bytes
Raw
Download
Tweet
HITS:
856
Go to comments
Report
window.onload = selectGuessField;
function selectGuessField()
{
guessfield.select();
guessfield.focus()
}
// the game "loop" -------------------------------------------------------------
function checkGuess()
{
// *** get inputs ***
guess = parseFloat(guessField.value);
// *** calculate the new state ***
if (Number.isInteger(guess)) // an integer was entered
{
if (guess == theNumber) // the guess was correct (collision detection)
{
comment = REPSUCCESS;
gameIsOver = true;
}
// ******UP TO HERE**********************************
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus