28 lines
801 B
C#
28 lines
801 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Assets.Common
|
|
{
|
|
[Serializable]
|
|
public class MapSite
|
|
{
|
|
public readonly Metadata Metadata = new Metadata();
|
|
|
|
public MapSite(Point center, IEnumerable<int> boundary)
|
|
{
|
|
Center = center;
|
|
Boundary = boundary;
|
|
}
|
|
|
|
public Point Center { get; set; }
|
|
public bool IsOuter { get; set; } = false;
|
|
public IEnumerable<int> Boundary { get; set; }
|
|
// public IEnumerable<(int, int)> Edges => Boundary.Append(Boundary.First()).Zip(Boundary.RotateRight(), (a, b) => (a, b));
|
|
public IEnumerable<(int, int)> Edges { get; set; }
|
|
|
|
[field: NonSerialized]
|
|
public Map Map { get; internal set; }
|
|
}
|
|
} |