Added the beginnings of decision making

Added this within the OnTouchListener for the function buttons