class_name PawnDisplay extends Panel

@onready var pawn_name : Label = %PawnName
@onready var trap_container : HBoxContainer = %TrapContainer
var traps : Array = []

func _ready() -> void:
	for child in trap_container.get_children():
		traps.append(child)

func set_traps(trap_list : Array[TrapSet]) -> void:
	var tcount = 0
	if len(trap_list) != 3:
		return
	for trap in traps:
		trap.setup(trap_list[tcount].type, trap_list[tcount].qty)
		tcount+=1

func set_pawn_name(name : String) -> void:
	pawn_name.text = name
