@tool
extends Node
class_name GameManager

@export_category("Complete rosters")
@export var character_roster: Array[CharacterResource]
@export var mask_roster: Array[MaskResource]

@export_category("Predetermined levels")
@export_group("Level 1")
@export var lvl1_guest_1: MaskedChara
@export var lvl1_guest_2: MaskedChara

@export_group("Level 2")
@export var lvl2_guest_1: MaskedChara
@export var lvl2_guest_2: MaskedChara

@export_category("Random levels")
@export var max_roster_size: int = 3;
@export_tool_button("Create chara roster") var create_roster_action = create_new_roster

var current_chara_roster: Array[MaskedChara]

enum GameState {
	READY,
	GUEST_REVIEW,
	FINISHED
}
enum Levels {
	LVL1,
	LVL2,
	RANDOM
}
var current_game_state = GameState.READY
var current_level = Levels.LVL1

func create_new_roster() -> void:
	print("Create new roster")
	var already_picked_charas: Array[String] = []
	for i in range(max_roster_size):
		var chara: CharacterResource = character_roster.pick_random()
		var mask: MaskResource = mask_roster.pick_random()
		var all_masks: Array[MaskResource] = [mask]
		var masked_chara = MaskedChara.new(chara, all_masks)
		current_chara_roster.append(masked_chara)
		print("Added %s to roster" % chara.name)

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass
