Package chesstrainer

Examples of chesstrainer.CMove


    public CAnalysisBoard() {
        this(new CPosition());
    }
   
    private boolean tryMove(ESquare from, ESquare to) {
        CMove move = new CMove(from, to);
        if (!SMoveGenerator.isLegalMove(position, move)) {
            return false;
        }
        position.makeMove(move);
        board.repaint();
View Full Code Here


            if (pieces[1].contains(s.name())) {
                to = s;
            }
        }
        if (!move.contains("=")) {
            return new CMove(from, to);
        }
        move = move.toLowerCase();
        if (move.contains("1")) {
            if (move.contains("=q")) {
                return new CMove(from, to, EPiece.WQ);
            }
            if (move.contains("=r")) {
                return new CMove(from, to, EPiece.WR);
            }
            if (move.contains("=b")) {
                return new CMove(from, to, EPiece.WB);
            }
            if (move.contains("=n")) {
                return new CMove(from, to, EPiece.WN);
            }
        } else {
            if (move.contains("=q")) {
                return new CMove(from, to, EPiece.BQ);
            }
            if (move.contains("=r")) {
                return new CMove(from, to, EPiece.BR);
            }
            if (move.contains("=b")) {
                return new CMove(from, to, EPiece.BB);
            }
            if (move.contains("=n")) {
                return new CMove(from, to, EPiece.BN);
            }
        }
       
        return null;
    }
View Full Code Here

TOP

Related Classes of chesstrainer.CMove

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.