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
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){ |
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
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){ |
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
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 |
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
get("/puzzle01validate"){ | |
tf = validateXY(params["xPos"], params["yPos"]) | |
return tf.to_s | |
} |
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
// 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 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
// 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 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
// 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 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
// 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 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
// 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 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
// 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 |
NewerOlder