Skip to content

Besogo ignores PL #29

@tkrajina

Description

@tkrajina

I'm testing with this simple SGF:

(;GM[1]FF[4]CA[UTF-8]AP[Sabaki:0.52.0]KM[6.5]SZ[19]DT[2022-07-20]PL[W])

There are no stones and no moves yet, but PL[W] tells that the next to make a move is white.

Besogo ignores the PL and behaves like it's black's turn:

Screenshot 2022-07-20 at 18 13 13

Here's a complete example:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BesoGo</title>

<link rel="icon" type="image/png" href="icon32.png" sizes="32x32">
<link rel="icon" type="image/png" href="icon152.png" sizes="152x152">
<link rel="icon" type="image/png" href="icon192.png" sizes="192x192">
<link rel="icon" type="image/png" href="icon512.png" sizes="512x512">
<link rel="apple-touch-icon-precomposed" href="icon152.png" sizes="152x152">
<link rel="apple-touch-icon-precomposed" href="icon192.png" sizes="192x192">
<link rel="icon" href="icon.svg" sizes="any" type="image/svg+xml">
<link rel="manifest" href="manifest.json" />
<meta name="description" content="BesoGo: a web-based SGF Editor">
<meta property="og:url" content="https://yewang.github.io/besogo/testing.html">
<meta property="og:type" content="website">
<meta property="og:title" content="BesoGo">
<meta property="og:description" content="BesoGo: a web-based SGF Editor">
<meta property="og:image" content="https://yewang.github.io/besogo/icon512.png">

<link rel="stylesheet" type="text/css" href="css/besogo.css">
<link rel="stylesheet" type="text/css" href="css/besogo-fill.css">
<link rel="stylesheet" type="text/css" href="css/board-flat.css">

<script src="js/besogo.js"></script>
<script src="js/editor.js"></script>
<script src="js/gameRoot.js"></script>
<script src="js/svgUtil.js"></script>
<script src="js/parseSgf.js"></script>
<script src="js/loadSgf.js"></script>
<script src="js/saveSgf.js"></script>
<script src="js/boardDisplay.js"></script>
<script src="js/coord.js"></script>
<script src="js/toolPanel.js"></script>
<script src="js/filePanel.js"></script>
<script src="js/controlPanel.js"></script>
<script src="js/namesPanel.js"></script>
<script src="js/commentPanel.js"></script>
<script src="js/treePanel.js"></script>

</head>
<body>
<div id="target"></div>

<script type="text/javascript">
(function() {
    const options = { resize: "fill" },
        div = document.getElementById('target'),
        params = new URLSearchParams(window.location.search);
    
    options.sgf = `
(;GM[1]FF[4]CA[UTF-8]AP[Sabaki:0.52.0]KM[6.5]SZ[19]DT[2022-07-20]PL[W])
`

    besogo.create(div, options);

    function addStyleLink(cssURL) {
        var element = document.createElement('link');
        element.href = cssURL;
        element.type = 'text/css';
        element.rel = 'stylesheet';
        document.head.appendChild(element);
    }
})();
</script>

</body>

</html>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions