Role Reveral of Guessing Numbers

[Total: 0    Average: 0/5]

You play the role of a psychic, our job is to read the mind of the computer,

Head Code:


 * Script Author: Hell Steinovski <>

 * Get the range of numbers to make a guess from
function getSize()
  var _default=100;
  var cl;
  var _cl ='Choose level of difficulty.n';
      _cl+='Please input a number of any size, the range will be 0 to whatever your input is'; 
  var clic=parseFloat(cl);
    alert('Integers only Please! ( -/+ numbers and 0 ) NoLetters or special character');
  return clic;

function makeNumber(_range)
  alert('On the next prompt,input your psychic reading:0-'+_range);
  var eng=Math.round(Math.random()*_range);
  return eng;

function getGuess()
  var guess=prompt('What number am i thinking of?');
  var numo=parseFloat(guess);
    alert('Numbers only Please! No Letters or special character');
  return numo;

function startGame()
  var SIZE=getSize();
  var NUMB=makeNumber(SIZE);
  var GUES=getGuess();
  var YES="<br><br><center><font color='green' size='20'>you are a natural!</font></center>";
  var NOT="<br><br><font color='red' size='16'>You're Not Really Psychic Are You?<br>";
  var TI ="<font color='blue' size='16'>i was thinking of:</font>";
  var _obj=document.getElementById("message");
  if (GUES==NUMB)

Body Code:

You play the role of a psychic, our job is to read the mind of the computer,<BR>
as of version three you get to input your own level, of an infinite value.<BR>
be warned, you only get one (high levels recomended for real psychics).<BR>
<form><input type=button value="Start Guessing Game" onclick="startGame()"></form>
<span id=message></span>

Times Viewed: 17

Leave a Reply

Your email address will not be published. Required fields are marked *