Closed ethanm123 closed 8 months ago
Fixed by modifying: Store/GameReducer.swift function userTappedSquare- the first guard statement only allows human to be set as one player, doesnt account for scenario where there is 2 humans (see pic) . I fixed this by first checking if there were 2 humans, and then if there were setting human to activeplayer.
Not allowing moves after using resetBoard with custom FEN: In Game/GameStatus.swift function computeGameStatus returned .unknown if there was no lastMove and the FEN was not the starting FEN, resulting in players being unable to move.
The quality of my fixes is bad so I won't be submitting a pull request for now unless I improve it. Hopefully this helps people with these issues/anyone who wants to add a proper fix.
Hi,
Really like the package but I can't get it to work with 2 human players from the beginning. I initialised it as per the example in the README, but after making a move with white I can't then move black.
Similarly, it breaks when resetting the board with my own FEN. This happens regardless of if the players are bots or humans, it just cant move following the board reset.
Has anyone had similar problems?