using UnityEngine;
using System.Linq;
using System.Collections.Generic;
using Gamelogic.Grids2;

public class PlaceEdges : MonoBehaviour {
    public Transform EdgeContentsPrefab;

	void Start () {
        PlaceEdgeTiles();
	}
	
    private void PlaceEdgeTiles()
    {
        var edges = GameMap.instance.Grid.Points
            .Where(o => GameMap.IsEdge(o));

        foreach (GridPoint2 p in edges)
            SpawnActor.SpawnPrefabAt(EdgeContentsPrefab, p);
    }

}
