using System; using System.Collections.Generic; using Vector2I = Vector.Vector2I; public interface IPiece { public interface IPieceOn { void OnPos(object self, Vector2I oldPos) {} void OnMove(object self, Vector2I oldPos) {} void OnSelected(object self, bool oldIsSelected) {} void OnName(object self, string oldName) {} } IPieceOn? On { get; protected set; } Vector2I Pos { get; set; } string Name { get; set; } bool IsSelected { get; set; } Dictionary Data { get; set; } bool CanMove(Vector2I to); bool Move(Vector2I pos); }