/// 初期局面の SFEN 定義。
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum InitialPosition {
    Standard,
    Empty,
    HandicapLance,
    HandicapRightLance,
    HandicapBishop,
    HandicapRook,
    HandicapRookLance,
    Handicap2Pieces,
    Handicap4Pieces,
    Handicap6Pieces,
    Handicap8Pieces,
    Handicap10Pieces,
}

impl InitialPosition {
    #[must_use]
    pub const fn sfen(self) -> &'static str {
        match self {
            Self::Standard => "lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",
            Self::Empty => "9/9/9/9/9/9/9/9/9 b - 1",
            Self::HandicapLance => {
                "lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1"
            }
            Self::HandicapRightLance => {
                "1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1"
            }
            Self::HandicapBishop => "lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",
            Self::HandicapRook => "lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",
            Self::HandicapRookLance => {
                "lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1"
            }
            Self::Handicap2Pieces => "lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",
            Self::Handicap4Pieces => "1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",
            Self::Handicap6Pieces => "2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",
            Self::Handicap8Pieces => "3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",
            Self::Handicap10Pieces => "4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",
        }
    }
}
