Exemplo n.º 1
0
 public List <Koma> GetBoardKomaList(PlayerType player)
 {
     return(KomaList.Where(x => x.Player == player && x.IsOnBoard).ToList());
 }
Exemplo n.º 2
0
 public GameState Clone()
 {
     return(new GameState(KomaList.Select(x => x.Clone()).ToList(), TurnPlayer, GameResult));
 }
Exemplo n.º 3
0
 public List <Koma> GetKomaList(PlayerType player)
 {
     return(KomaList.Where(x => x.Player == player).ToList());
 }
Exemplo n.º 4
0
 public BoardPositions BoardPositions(PlayerType player)
 {
     return(new BoardPositions(KomaList.Where(x => x.Player == player && x.IsOnBoard).Select(x => x.BoardPosition).ToList()));
 }
Exemplo n.º 5
0
 public Koma FindHandKoma(PlayerType player, KomaType komaType)
 {
     return(KomaList.FirstOrDefault(x => x.Player == player && x.IsInHand && x.KomaType == komaType));
 }
Exemplo n.º 6
0
 public Koma FindBoardKoma(BoardPosition fromPosition)
 {
     return(KomaList.FirstOrDefault(x => x.BoardPosition == fromPosition));
 }
Exemplo n.º 7
0
 public Koma FindKingOnBoard(PlayerType player)
 {
     // [MEMO:プレイヤーの王は盤上に1つのみあることを前提]
     return(KomaList.FirstOrDefault(x => x.Player == player && x.KomaType.IsKing && x.IsOnBoard));
 }