public Koma FindBoardKoma(BoardPosition fromPosition) { return(KomaList.FirstOrDefault(x => x.BoardPosition == fromPosition)); }
public Koma FindHandKoma(PlayerType player, KomaType komaType) { return(KomaList.FirstOrDefault(x => x.Player == player && x.IsInHand && x.KomaType == komaType)); }
public Koma FindKingOnBoard(PlayerType player) { // [MEMO:プレイヤーの王は盤上に1つのみあることを前提] return(KomaList.FirstOrDefault(x => x.Player == player && x.KomaType.IsKing && x.IsOnBoard)); }