class_name cGame

var night: cNight
var rooms: Dictionary = {}
var enemies: Dictionary = {}
var locations: Dictionary = {}

var nightStarted = false
var nightCompleted = false

func build_rooms():
	for id_str in locations.keys():
		var data = locations[id_str]

		var room = cRoom.new()
		room.id = int(id_str)
		room.name = data.name
		room.connections = data.connections

		rooms[room.id] = room

func make_enemies():
	var eConstruct = npcConstruct.new()
	var eFlesher = npcFlesher.new()
	var eAkers = npcAkers.new()
	var eYoshida = npcYoshida.new()
	enemies = {
		"construct": eConstruct,
		"flesher": eFlesher,
		"akers": eAkers,
		"yoshida": eYoshida
	}

func _setup() -> Array:
	print("Setting up Game")
	night = cNight.new()
	locations = Global.locations
	build_rooms()
	make_enemies()
	print([rooms, enemies])
	return [rooms, enemies]
