extends Spatial

var _game_manager

func _ready():
	_game_manager = get_node("/root/Game_manager")

func left_click_on_hex(hex_node):
	if _game_manager.is_my_turn():
		
		if _game_manager.ability_left():
		
			if hex_node.is_free():
				
				if _game_manager.get_previous_hex() != null:
					
					if hex_node in _game_manager.get_previous_hex().get_neighbours():
						_game_manager.try_to_occupy_hex(hex_node)
				else:
					_game_manager.try_to_occupy_hex(hex_node)
						
func right_click_on_hex(hex_node):
	pass
