fluxroot / flux Goto Github PK
View Code? Open in Web Editor NEWA Java Chess Engine
Home Page: https://github.com/fluxroot/flux
License: GNU Lesser General Public License v3.0
A Java Chess Engine
Home Page: https://github.com/fluxroot/flux
License: GNU Lesser General Public License v3.0
Hi there,
I am still using flux for https://github.com/jubalh/jessy. We were still based on revision a1c13d2 today I wanted to update it to the newest. I already changed all my code for it, but one thing is confusing. I can't access the former class "Hex88Board" now called "Position" anymore since you made it not available from outside the package in commit d028c4f. Why is that? Is there another way I have to access it now?
Looking forward to your response so I can push my changes online :)
cheers
jubalh
Hey! I released flux to maven central as version 2.2.2.1, the .1 because of stuff I added for maven central deployment (pom.xml).
import com.fluxchess.flux.board.Hex88Board;
import com.fluxchess.flux.move.IntMove;
import com.fluxchess.jcpi.models.GenericBoard;
import com.fluxchess.jcpi.models.GenericMove;
import com.fluxchess.jcpi.models.IllegalNotationException;
import org.junit.Assert;
public class Main {
public static void main(String[] args) throws IllegalNotationException {
// First board
GenericBoard board1 = new GenericBoard(GenericBoard.STANDARDSETUP);
Hex88Board hex88Board1 = new Hex88Board(board1);
// Second board
GenericBoard board2 = new GenericBoard(GenericBoard.STANDARDSETUP);
Hex88Board hex88Board2 = new Hex88Board(board2);
// Make a move on the first board, which changes its state
hex88Board1.makeMove(IntMove.convertMove(new GenericMove("g1f3"), hex88Board1));
// At this point I assume that only first board positions are changed,
// though that doesn't seem to be the case
System.out.println(hex88Board1.toString().split(" ")[0]);
System.out.println(hex88Board2.toString().split(" ")[0]);
Assert.assertNotEquals(
hex88Board1.toString().split(" ")[0],
hex88Board2.toString().split(" ")[0]
);
}
}
The output:
rnbqkbnr/pppppppp/8/8/8/5N2/PPPPPPPP/RNBQKB1R
rnbqkbnr/pppppppp/8/8/8/5N2/PPPPPPPP/RNBQKB1R
Exception in thread "main" java.lang.AssertionError: Values should be different. Actual: rnbqkbnr/pppppppp/8/8/8/5N2/PPPPPPPP/RNBQKB1R
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failEquals(Assert.java:185)
at org.junit.Assert.assertNotEquals(Assert.java:161)
at org.junit.Assert.assertNotEquals(Assert.java:175)
at Main.main(Main.java:26)
Hello
can you create a jar -file please and host this application on GitHub, too?
http://www.oracle.com/technetwork/java/javase/downloads/jre10-downloads-4417026.html
java.lang.ArrayIndexOutOfBoundsException: length=64; index=-1
com.fluxchess.board.Hex88Board.addPosition(Hex88Board.java:1663)
com.fluxchess.board.Hex88Board.move(Hex88Board.java:405)
com.fluxchess.board.Hex88Board.undoMoveNormal(Hex88Board.java:1315)
com.fluxchess.board.Hex88Board.undoMove(Hex88Board.java:1182)
com.fluxchess.Search.quiescent(Search.java:1487)
com.fluxchess.Search.alphaBeta(Search.java:926)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1264)
com.fluxchess.Search.alphaBeta(Search.java:1269)
com.fluxchess.Search.alphaBetaRoot(Search.java:756)
com.fluxchess.Search.getBestMove(Search.java:512)
com.fluxchess.Search.run(Search.java:191)
java.lang.Thread.run(Thread.java:841)
I'm create chess game with flux engine at android phone.
Sometimes it's crashes after engine receives command for search best move.
Hey!
Is there a method to check for checkmate?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.