org.xistrat.math
Class Players

java.lang.Object
  extended by org.xistrat.math.Players

public class Players
extends java.lang.Object

used to speed up things dealing with the players participating in a game instead of accessing the pieces' alive state

Since:
0.5.42

Field Summary
 boolean[] alive
           
 int numAlP
           
 int numP
           
 
Constructor Summary
Players(boolean[] alive, int numP, int numAlP)
           
Players(FigurData[] fastFigs)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean[] getAllAlStatus(FigurData[] fastFigs)
           
 int getNextPlayer(int current)
           
static int getNumAlP(FigurData[] fastFigs)
          only alive parties!
static int getNumP(FigurData[] fastFigs)
          dead party are counted as well supposes that participating parties have subsequent party ids starting at 0, no gaps allowed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alive

public boolean[] alive

numP

public int numP

numAlP

public int numAlP
Constructor Detail

Players

public Players(FigurData[] fastFigs)

Players

public Players(boolean[] alive,
               int numP,
               int numAlP)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getAllAlStatus

public boolean[] getAllAlStatus(FigurData[] fastFigs)

getNumP

public static int getNumP(FigurData[] fastFigs)
dead party are counted as well

supposes that participating parties have subsequent party ids starting at 0, no gaps allowed


getNumAlP

public static int getNumAlP(FigurData[] fastFigs)
only alive parties!


getNextPlayer

public int getNextPlayer(int current)