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
| window.addEventListener("load", function(){ | |
| function showHideMenu(e){ | |
| e.preventDefault(); | |
| if (menuBlock.style.display === "none"){ | |
| menuBlock.style.display = "flex"; | |
| } | |
| else if (menuBlock.style.display === "flex"){ | |
| menuBlock.style.display = "none"; |
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
| .menu { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| position: fixed; | |
| color: #424242; | |
| background-color: #d8d8d8; | |
| box-shadow: 0px 3px 7px #c1c1c1; | |
| padding-top: 23px; | |
| padding-bottom: 23px; |
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
| .menu { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| position: fixed; | |
| color: #424242; | |
| background-color: #d8d8d8; | |
| box-shadow: 0px 3px 7px #c1c1c1; | |
| padding-top: 23px; | |
| padding-bottom: 23px; |
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 function and sends them to the server to determine whether or not these coordinates are correct for Waldo. | |
| function sendInfoToServer(x, y){ |
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
| require 'sinatra' | |
| require 'pry' | |
| require 'CSV' | |
| require_relative 'csvMaker.rb' | |
| get("/"){ | |
| erb :index | |
| } |
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
| require 'sinatra' | |
| require 'pry' | |
| require 'CSV' | |
| require_relative 'csvMaker.rb' | |
| get("/"){ | |
| erb :index | |
| } | |
| get("/puzzle01score"){ |
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
| require 'sinatra' | |
| get("/"){ | |
| erb :index | |
| } |
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
| require 'sinatra' | |
| get("/"){ | |
| erb :index | |
| } | |
| get("/puzzle01"){ | |
| erb :pic1 | |
| } |