예제 #1
0
	def POST(self):
		"""
		This function checks to see if the home button was pressed and if it was homeScreen.html is rendered. If not, lastScreen.html stays rendered.

		Parameters:
		None

		Returns:
		None
		"""
		playerStateObject = PlayerState() #Updating the player state
		if web.input()['home']=='home': #Checks to see if the player pressed the home button
			raise web.seeother('/end') #If the above is true homeScreen.html is rendered
		else:
			DBManager.insertPlayerStepAction(playerStateObject.player_id) #If the player did not hit the home button this line records the action the player took and saves it in the database
			raise web.seeother('/end') #This line renders endScreen.html