public final List<Move> getPossibleMoves(ChessBoard board) {
        List<Move> possibleMoves = new LinkedList<Move>();
        for (Move e : getMoves(board)) {
            e.executeMove(board);
            if (board.checkKingIsSafe(e.getMovedCoin().getColor())) {
                possibleMoves.add(e);
            }
            e.undoMove(board);

        }
        return possibleMoves;
    }