April 22
							
								- 	
									Well, today's the big day! My presentation is in exactly 4 hours, 38 minutes. The projector works
									great, and I tested the program and it works, so fingers crossed! I created some backup video
									just in case.
  
 As for it not working on a phone, I've discovered that it works when I use WiFi as opposed to the phone
									provider's internet. Whew!
 
 Goals for this week:
 - Finish my webite
 - Finish my binder WIP
 
					 
					
				 
				
			 
			
			
				
					
						
							April 19
							
								- 	
									Well, I think I've figured out all the solvable bugs in my code! I had Chris play it without 
									any help from me and he gave me some helpful suggestions that I implemented. Joe and I are 
									going to practice our presentations on Sunday and I'll have him play as well, just as an extra
									precaution. I've finished my presentation, too, so now I just need to practice with the projector.
									I've been working through stuff in the binder, too, so that's almost done!
 
 Something I have discovered, though, is that the program doesn't work on a phone. I think
									the two-way handshaking requires more processing capabilities than a phone browser has. I don't have
									the ability to fix it at this point - it would mean changing the entire way that the handshaking occurs -
									but it just stinks. I was really excited to see it used.
 
 Goals for this week:
 - Finish my webite
 - Finish my binder WIP
 - Finish my presentation Done!
 
					 
					
				 
				
			 
			
			
				
					
						
							April 17
							
								- 	
									Ugh, sometimes I think I belong back in CS 110. I spent the longest time trying to figure
									out why my user-side wasn't going back to the title page when it was supposed to (when they
									won or lost a game). My code looked something like this:
 
 if (input != "")
      do this
 
 else if (input == "|")
       do that
 
 I couldn't figure out why the input never go to "that". I finally realized that
									if input == "|", then it would also != "", and it would never get to "that".
									Silly me. The simple solution was to flip the two statements around, and it worked.
									I also solved another issue I'd been having - I created a 'timer' for the
									user so they only had 10 seconds to answer before the kiosk would check at 11 seconds.
									It turns out that I wasn't realizing that the user browser needed a few seconds
									after the initial 10 in order to write to the file, so when the kiosk checked at 11
									seconds, nothing was written to it yet. But I solved that in a relatively simple way -
									after 5 seconds, the kiosk starts checking the file ever second. Through a parameter 
									pass, it keeps track of how many times it's checked, and after 10 checks, if there is 
									still nothing in the file, it assumes the user hasn't answered. It's worked so far, so
									I'm keping my fingers crossed!
 
 Now that I think I've finished my project (omigod, I can't believe I'm actually
									saying that!) all I need to finish is the wrap-up stuff: presentation, website, binder!
 
 Goals for this week:
 - Set a timer for the user so that they have a limited time to answer Done!
 - Finish my webite
 - Finish my binder
 - Finish my presentation
 
					 
					
				 
				
			 
			
			
				
					
						
							April 12
							
								- 	
									Met with Pankratz and McVey today - they had some good ideas about how to solve the problem I've been
									having with the kiosk browser freezing (we think it's because it's trying to read from a file that is
									at the same time being written to). Their suggestion was to give the user a limited amount of time to 
									answer (with a visual: "10...9...8") and then after that time has elapsed, have the kiosk check the 
									file to get the answer. If nothing is there, the kiosk will read it as a null and move on. This also
									solves the problem of the user closing the browser and quitting the game: nothing will be written to
									the file, so the game will run by itself, getting null answers, until the game is over and it returns
									to the title screen.
 
 They also had a suggestion for another problem I've been having. On the first question, the kiosk-browser
									is supposed to write the answers to a file, and then the user-browser reads from it and displays the possible
									answers. The problem I've been having is that the user-side loads first, and finds data in the file from a previous
									question, regardless of how many times I try and write "" to it so that it is clear. Their suggestion was to have
									a 'lock' on the file: I've created another file, which contains a '0'. The kiosk-broswer writes the possible answers
									to the user_answer file, and then writes a '1' to the lock file. The user_side browser waits until it sees a '1', and
									then reads from the user_answer file. I have the user-side browser also reseting the lock file back to '0' for the
									next turn.
 
 I've already finished the lock file issue, so I'll be working on the timer over the weekend. The end's in sight!
 
 Goals for this week:
 - Set a timer for the user so that they have a limited time to answer
 
					 
					
				 
				
			 
			
			
				
					
						
							April 10
							
								- 	
									Getting closer and closer! The user-side browser now resets after the game is won or lost, and the 
									kiosk-side browser displays a message ("Congratulations, you've won the game!") or ("Game over") and 
									after a certain amount of seconds, resets to its title screen.
 
 I've been having some issues with the handshaking between the browsers, though. Sometimes the kiosk will
									sort of freeze and completely miss when the user presses a button. It's something I'll have to work on this
									week, although I'm not even sure what's causing it- Dr. Pankratz thinks it's because one side will try to read a file 
									when the other side is editing it, but I'd have no idea how to prevent it...
 
 Besides that, the only goal I have to finish is that I want the kiosk to recognize if the user closes the browser
									in the middle of the game and will reset back to the title screen. That's gonna take some work, though - 
									I thought that trying to catch an 'onclose()' event might solve it, but the only event I can find is an 'onunload()', 
									and that would fire every time a page is directed away (for example- the main page directs to another page that
									does the work and then redirects back to the main page too quickly for the user to notice, so the onunload event
									would fire even though the browser itself never closes). So, I've got to figure out another method. Not sure 
									how to proceed.
 
 Goals for this week:
 - Implement a way that gives an answer's explanation after the user guesses Done!
 - Close the game after the user loses three lives Done!
 - Go back to the title screen if the user closes the browser
 
					 
					
				 
				
			 
			
			
				
					
						
							April 7
							
								- 	
									Worked some more at it today! Stylized it so that the user side and the kiosk side actually
									look nice and match each other. Also made it so that the possible answers show up on the 
									user side (rather than just numbered buttons) - I found it to be a little difficult to 
									understand, especially when the answer were just numbers (for example: one group of answers
									are "5, 6, 7, 8" and when compared to the user side buttons, which were numbered "1, 2, 3, 4"
									it was hard to understand, even writing it myself. I'm struggling with how to do it, a little,
									though. Technically, the user-side loads first, even though the kiosk-side is the one that
									chooses the question, and, thus, the answer....It's a work in progress.
 
 I've noticed that, although the kiosk connection works, it is a little sporadic and sometimes
									after a few minutes, the browser gives up waiting for a change and just crashes. Although this 
									isn't my main concern right now, this means that something will have to change to potentially use
									it as a kiosk - there will be large amounts of time in between users, so this method as is won't work.
 
 Besides that, I'm very happy with how my project is coming along. I've been documenting as I go, so
									hopefully I won't have that much to do after I actually finish the code itself (which is good, because
									the presentations are in a few weeks!)
 
 Kiosk Side:
  
 User Side:
  
 
 Goals for this week:
 - Re-do the user-side browser: needs a 50/50 button Done!
 - Get a tenative connection going! DONE!!!
 - Take care of what the happens when the user gets an answer incorrect
 - Implement a way that gives an answer's explanation after the user guesses I have one, it just
									doesn't give the correct explanation...
 - Close the game after the user loses three lives
 - Go back to the title screen if the user closes the browser
 
					 
					
				 
				
			 
			
			
				
					
						
							April 5
							
								- 	
									IT WORKED IT WORKED IT WORKED. I was actually able to get a connection working! I'm using 
									AJAX to contiuously reread the user input text file every few seconds, and it was actually
									able to recognize when I clicked a button on the user browser! I'm so excited that I had
									to write a blog - I plan on working more (and making more progress!) today, but I just
									had to tell someone!! 
 
 Remember those magnectic "How Do You Feel Today?" things...?
   
 Updated Kiosk Website
 
 Goals for this week:
 - Re-do the user-side browser: needs a 50/50 button
 - Get a tenative connection going! DONE!!!
 - Take care of what the happens when the user gets an answer incorrect
 - Implement a way that gives an answer's explanation after the user guesses I have one, it just
									doesn't give the correct explanation...