コード例 #1
0
 public Boolean sameTeam(Pieces piece1, Pieces piece2)
 {
     return(piece1.getTeam() == piece2.getTeam());
 }
コード例 #2
0
 public Boolean isOppositeTeam(Pieces piece1, Pieces piece2)
 {
     return((piece1.getTeam() == Team.BLACK && piece2.getTeam() == Team.WHITE) || (piece1.getTeam() == Team.WHITE && piece2.getTeam() == Team.BLACK));
 }
コード例 #3
0
 public bool isTeamsTurn(Pieces piece)
 {
     return(piece.getTeam() != Team.NONE && piece.getTeam() != lastTeam);
 }