extends VBoxContainer

#var level : PackedScene = load("res://Scenes/main.tscn")
var main_menu : PackedScene = load("res://Scenes/main_menu.tscn")
@onready
var score_label : Label = $FinalScore

func update_score() -> void:
	if score_label != null:
		score_label.text = "Final Score\n\n{score}".format(GameManager)

func restart():
	get_tree().change_scene_to_packed(load("res://Scenes/main.tscn"))
	GridManager.current_allowed_spawns.clear()
	GameManager.score = 0

func back():
	get_tree().change_scene_to_packed(main_menu)
	GridManager.current_allowed_spawns.clear()
	GameManager.score = 0
