public void draw(Graphics g, int tile) {
        int col = -1;
        for (int i = 0; i < board.length; i++) {
            col = -col;
            for (int n = 0; n < board.length; n++) {
                //Checkers the board
                if (col == 1) {
                    g.setColor(bBlack);
                } else {
                    g.setColor(bWhite);
                }
                col = -col;

                g.fillRoundRect((i + 1) * tile, (n + 1) * tile, tile, tile, 5);
                if (hlight[i][n]) {
                    g.setColor(hcolor);
                    g.fillRoundRect((i + 1) * tile, (n + 1) * tile, tile, tile, 5);
                }
                g.setColor(Color.lightGray);
                if (board[i][n] != null) {
                    if (board[i][n].white) {
                        g.drawImage(pieces[board[i][n].getType() - 1][1], (i + 1) * tile, (n + 1) * tile);
                    } else {
                        g.drawImage(pieces[board[i][n].getType() - 1][0], (i + 1) * tile, (n + 1) * tile);
                    }
                }
            }
        }
    }