extends InputStrategy
class_name InputStrategy_Idle

func enter() -> void:
	pass

func exit() -> void:
	pass

func update() -> void:
	if (Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT)):
		# Determine if we're over a valid letter

		var mousePositionInScreenCoordinates = get_viewport().get_mouse_position()

		var letterManager = parentManager.get_letter_manager()

		var clickedPos = letterManager.logical_position_from_screen_position(mousePositionInScreenCoordinates)
		print("Mouse position: " + str(mousePositionInScreenCoordinates))
		print("Logical position: " + str(clickedPos))

		if (letterManager.letter_exists_at_position(clickedPos)):
			transition_to(State.INPUT_INTRO)
			return

		transition_to(State.STUCK)
		return
