Skip to content

Instantly share code, notes, and snippets.

View crestinglight's full-sized avatar

Evin Brooks crestinglight

  • SupportWorks Inc
  • Omaha, NE
View GitHub Profile
function saveScore(e){
var response = false;
if (e.target.responseText === "true"){
response = true;
}
// This if statement checks to see if "didYouFindWaldo"
// returns true. If so, we move on to stop the timer.
if (response === true){
function saveScore(e){
var response = false;
if (e.target.responseText === "true"){
response = true;
}
// This if statement checks to see if "didYouFindWaldo"
// returns true. If so, we move on to stop the timer.
if (response === true){
def validateXY(x, y)
intX = x.to_i
intY = y.to_i
if (intX > 380) && (intX < 419) && (intY > 262) && (intY < 302)
return true
else
return false
end
end
get("/puzzle01validate"){
tf = validateXY(params["xPos"], params["yPos"])
return tf.to_s
}
// This function gets the X and Y coordinates of where the
// user clicked, relative to the image.
function getXY(e){
var xPosition = e.offsetX;
var yPosition = e.offsetY;
// Sending x and y to the server.
sendInfoToServer(xPosition, yPosition);
}
// Takes the x and y coordinates, passed from the getXY
// This function gets the X and Y coordinates of where the
// user clicked, relative to the image.
function getXY(e){
var xPosition = e.offsetX;
var yPosition = e.offsetY;
// Sending x and y to the server.
sendInfoToServer(xPosition, yPosition);
}
// Takes the x and y coordinates, passed from the getXY
// This function gets the X and Y coordinates of where the
// user clicked, relative to the image.
function getXY(e){
var xPosition = e.offsetX;
var yPosition = e.offsetY;
// Sending x and y to the server.
sendInfoToServer(xPosition, yPosition);
}
// Takes the x and y coordinates, passed from the getXY
// This function gets the X and Y coordinates of where the
// user clicked, relative to the image.
function getXY(e){
var xPosition = e.offsetX;
var yPosition = e.offsetY;
// Sending x and y to the server.
sendInfoToServer(xPosition, yPosition);
}
// Takes the x and y coordinates, passed from the getXY
// This function gets the X and Y coordinates of where the
// user clicked, relative to the image.
function getXY(e){
var xPosition = e.offsetX;
var yPosition = e.offsetY;
// Sending x and y to the server.
sendInfoToServer(xPosition, yPosition);
}
// Takes the x and y coordinates, passed from the getXY
// This function gets the X and Y coordinates of where the
// user clicked, relative to the image.
function getXY(e){
var xPosition = e.offsetX;
var yPosition = e.offsetY;
// Sending x and y to the server.
sendInfoToServer(xPosition, yPosition);
}
// Takes the x and y coordinates, passed from the getXY