package main.java.de.movope.game;


public class ChessGame {

    ChessBoard board = new ChessBoard();
    Player white = new Player(board, Color.WHITE);
    Player black = new Player(board, Color.BLACK);

    public void init() {
        board.initPieces();
    }


    public Player getWhitePlayer() {
        return white;
    }

    public Player getBlackPlayer() {
        return black;
    }

    public void print() {
        ChessGameUtils.print(board);
        System.out.println();
        System.out.println();
        System.out.println();
    }

    public static void main(String[] arg) {
        ChessGame game = new ChessGame();
        game.init();

        Player white = game.getWhitePlayer();
        Player black = game.getBlackPlayer();

        game.print();

        for (int i = 0; i < 140 && !white.isGameOver() && !black.isGameOver(); i++) {
            white.makeRandomMove();
            game.print();
            black.makeRandomMove();
            game.print();
        }
    }
}
@@ -554,457 +554,6 @@
    %7D
-%0A%0A    public static void main(String%5B%5D arg) %7B%0A        ChessGame game = new ChessGame();%0A        game.init();%0A%0A        Player white = game.getWhitePlayer();%0A        Player black = game.getBlackPlayer();%0A%0A        game.print();%0A%0A        for (int i = 0; i %3C 140 && !white.isGameOver() && !black.isGameOver(); i++) %7B%0A            white.makeRandomMove();%0A            game.print();%0A            black.makeRandomMove();%0A            game.print();%0A        %7D%0A    %7D
 %0A%7D

delete main()