//using System.Drawing; //using System.Numerics; //namespace BoardRules; //public static class PieceMoves //{ // public static readonly ICollection GoldGeneralMoves = // [ // new(-1, 1), // new(0, 1), // new(1, 1), // new(-1, 0), // new(1, 0), // new(0, -1) // ]; // public static readonly ICollection PawnMoves = [new(0, 1)]; // public static readonly ICollection KnightMoves = [new(-1, 2), new(1, 2)]; // public static readonly ICollection BishopMoves = // [ // new(float.NegativeInfinity, float.NegativeInfinity), // new(float.NegativeInfinity, float.PositiveInfinity), // new(float.PositiveInfinity, float.PositiveInfinity), // new(float.PositiveInfinity, float.NegativeInfinity), // ]; //} //public class BoardRules //{ // private readonly Dictionary pieces = []; // public BoardRules WithSize(int width, int height) // { // this.BoardSize = new Size(width, height); // return this; // } // public Size BoardSize { get; private set; } // public BoardRules AddPiece(IPiece piece) // { // pieces.Add(piece.Name, piece); // return this; // } //} //public class BoardPieceRules(BoardRules rules, IPiece piece) //{ // public IPiece Piece { get; } = piece; // public BoardRules WithStartingPositions(ICollection positions) // { // // Validate positions against board size // foreach (var pos in positions) // { // if (pos.X < 0 || pos.Y < 0 || pos.X >= rules.BoardSize.Width || pos.Y >= rules.BoardSize.Height) // { // throw new ArgumentOutOfRangeException(nameof(positions), $"Position {pos} is out of bounds for board size {rules.BoardSize}."); // } // } // // Assuming piece has a way to set starting positions, which it currently does not. // // This is just a placeholder to show intent. // // piece.SetStartingPositions(positions); // return rules; // } //} //public interface IPiece //{ // public string Name { get; } // public ICollection MoveSet { get; } // public ICollection PromotedMoveSet { get; } // /// // /// The starting positions for this type of piece on the board. There could be one or many. // /// // public ICollection StartingPositions { get; } //} //public class GoldGeneral : IPiece //{ // public string Name => nameof(GoldGeneral); // public ICollection MoveSet => PieceMoves.GoldGeneralMoves; // public ICollection PromotedMoveSet => PieceMoves.GoldGeneralMoves; // public ICollection StartingPositions => [new(3, 0), new(5, 0), new(4, 1)]; //} //public class Pawn : IPiece //{ // public string Name => nameof(Pawn); // public ICollection MoveSet => PieceMoves.PawnMoves; // public ICollection PromotedMoveSet => PieceMoves.GoldGeneralMoves; //} //public class Knight : IPiece //{ // public string Name => nameof(Knight); // public ICollection MoveSet => PieceMoves.KnightMoves; // public ICollection PromotedMoveSet => PieceMoves.GoldGeneralMoves; //} //public class Bishop : IPiece //{ // public string Name => nameof(Bishop); // public ICollection MoveSet => PieceMoves.BishopMoves; // public ICollection PromotedMoveSet => PieceMoves.BishopMoves; //} //public class Luke //{ // public void Yep() // { // var board = new BoardRules() // .WithSize(9, 9) // .AddPiece(new Pawn()) // } //}