mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-12 17:12:40 +01:00
DroidFish: Made member variables in DroidComputerPlayer non-static. There is only one DroidComputerPlayer object anyway.
This commit is contained in:
@@ -39,25 +39,21 @@ import org.petero.droidfish.gamelogic.SearchListener.PvInfo;
|
|||||||
* @author petero
|
* @author petero
|
||||||
*/
|
*/
|
||||||
public class DroidComputerPlayer {
|
public class DroidComputerPlayer {
|
||||||
private static String engineName = "";
|
private String engineName = "";
|
||||||
|
|
||||||
private static UCIEngine uciEngine = null;
|
private UCIEngine uciEngine = null;
|
||||||
private SearchListener listener;
|
private SearchListener listener;
|
||||||
private DroidBook book;
|
private DroidBook book;
|
||||||
private boolean newGame = false;
|
private boolean newGame = false;
|
||||||
private String engine = "";
|
private String engine = "";
|
||||||
private int maxPV = 1; // >1 if multiPV mode is supported
|
private int maxPV = 1; // >1 if multiPV mode is supported
|
||||||
private static int numCPUs = 1;
|
private int numCPUs = 1;
|
||||||
|
|
||||||
private boolean havePonderHit = false;
|
private boolean havePonderHit = false;
|
||||||
|
|
||||||
public DroidComputerPlayer(String engine) {
|
public DroidComputerPlayer(String engine) {
|
||||||
this.engine = engine;
|
this.engine = engine;
|
||||||
if (uciEngine != null) {
|
startEngine();
|
||||||
stopSearch();
|
|
||||||
} else {
|
|
||||||
startEngine();
|
|
||||||
}
|
|
||||||
listener = null;
|
listener = null;
|
||||||
book = DroidBook.getInstance();
|
book = DroidBook.getInstance();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user