def logic(actions):
	"""Press a and d to switch from adding and removing toppings, press 0-9 to deal with the toppings and press space to eat the pizza"""
	key = actions['key']
	if key == "d":
		spk("Press a number to remove a topping from your pizza, press a to add toppings again")
		storage.screen[0] = "remove"
		storage.did_run = False
	elif key == "a":
		spk("Press a number to add a topping to your pizza. Press d to remove a topping you don't like")
		storage.screen[0] = "add"
		storage.did_run = False
	elif key == "space":
		spk("You sit down to enjoy a yummy pizza. You eat... eat... eat... eat... and are finally done. That was good! Now it's time for another!")
		storage.your_toppings = ['cheese']
		storage.did_run = False
	elif storage.screen[0] == "start":
		spk("Welcom to pizza madness! Here you can build your own pizza to eat! Press a to add toppings, press d to remove them and when you are done, press space to eat your yummy pizza!!!")
		storage.screen.remove("start")
		storage.screen.append("add")
	elif storage.screen[0] == "add":
		say_message("Please choose a number of toppings to add! Press d to start removing toppings. Toppings are %s" % storage.toppings)
		if key:
			add_topping(key)
	elif storage.screen[0] == "remove" and key:
			remove_topping(key)