{"action":"created","issue":{"url":"https://api.github.com/repos/willb335/chessboardjsx/issues/29","repository_url":"https://api.github.com/repos/willb335/chessboardjsx","labels_url":"https://api.github.com/repos/willb335/chessboardjsx/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/willb335/chessboardjsx/issues/29/comments","events_url":"https://api.github.com/repos/willb335/chessboardjsx/issues/29/events","html_url":"https://github.com/willb335/chessboardjsx/issues/29","id":344886144,"node_id":"MDU6SXNzdWUzNDQ4ODYxNDQ=","number":29,"title":"Bug: board won't update if game's first move is a CPU move","user":{"login":"furrykef","id":536006,"node_id":"MDQ6VXNlcjUzNjAwNg==","avatar_url":"https://avatars1.githubusercontent.com/u/536006?v=4","gravatar_id":"","url":"https://api.github.com/users/furrykef","html_url":"https://github.com/furrykef","followers_url":"https://api.github.com/users/furrykef/followers","following_url":"https://api.github.com/users/furrykef/following{/other_user}","gists_url":"https://api.github.com/users/furrykef/gists{/gist_id}","starred_url":"https://api.github.com/users/furrykef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furrykef/subscriptions","organizations_url":"https://api.github.com/users/furrykef/orgs","repos_url":"https://api.github.com/users/furrykef/repos","events_url":"https://api.github.com/users/furrykef/events{/privacy}","received_events_url":"https://api.github.com/users/furrykef/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-26T15:10:05Z","updated_at":"2018-07-26T19:44:15Z","closed_at":null,"author_association":"NONE","body":"Let's say you have a CPU vs. CPU match, like in the Random vs. Random demo in Demo.js. If you watch that demo carefully, you'll notice that white's first move does not register until black makes a move; they appear to move at about the same time. This is much more obvious if you [increase the time between moves to 5 seconds](https://codesandbox.io/s/w7woq5k1ql). All moves after white's first move do update the board correctly.\r\n\r\nFor a CPU vs. CPU game, this is only a visual quirk, but CPU vs. human games (where the CPU is white) are unplayable, because it looks like white hasn't moved."},"comment":{"url":"https://api.github.com/repos/willb335/chessboardjsx/issues/comments/408213227","html_url":"https://github.com/willb335/chessboardjsx/issues/29#issuecomment-408213227","issue_url":"https://api.github.com/repos/willb335/chessboardjsx/issues/29","id":408213227,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODIxMzIyNw==","user":{"login":"furrykef","id":536006,"node_id":"MDQ6VXNlcjUzNjAwNg==","avatar_url":"https://avatars1.githubusercontent.com/u/536006?v=4","gravatar_id":"","url":"https://api.github.com/users/furrykef","html_url":"https://github.com/furrykef","followers_url":"https://api.github.com/users/furrykef/followers","following_url":"https://api.github.com/users/furrykef/following{/other_user}","gists_url":"https://api.github.com/users/furrykef/gists{/gist_id}","starred_url":"https://api.github.com/users/furrykef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/furrykef/subscriptions","organizations_url":"https://api.github.com/users/furrykef/orgs","repos_url":"https://api.github.com/users/furrykef/repos","events_url":"https://api.github.com/users/furrykef/events{/privacy}","received_events_url":"https://api.github.com/users/furrykef/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T19:44:15Z","updated_at":"2018-07-26T19:44:15Z","author_association":"NONE","body":"I think I've made this bug too specific. The more general bug is something like, a change to the `position` property will be ignored if all of the following are true:\r\n- It is the very first change to the property after the component was constructed.\r\n- Only one piece has moved.\r\n- The user has not dragged a piece.\r\n\r\nI've made [a demo](https://codesandbox.io/s/qk02z96rzw) that demonstrates this. It's supposed to display this sequence, each position appearing 3 seconds apart:\r\n- The starting position\r\n- The position after 1.e4\r\n- The Lucena position\r\n- A back rank mate\r\n\r\nHowever, what will happen is it will display the starting position for 6 seconds, then the Lucena position for 3 seconds, and finally the back rank mate. The 1.e4 position gets skipped over.\r\n\r\nIf you change the FEN in the routine for timer1 so that it differs by more than one piece, such as moving both the d- and e-pawns, it will display fine."}}
{"actor":{"display_login":"furrykef"}}