04-24-2021, 12:31 AM
(This post was last modified: 04-24-2021, 12:36 AM by dale walton.)
OK. Downloaded 1.1.17
Had a couple hangs, including one after clicking pass before the game, in which resizing the window bottom still "worked" leaving black in the new area. And once where the window with the game flashed as if it was repeatedly closing and re-opening, and a few requiring ^C in the terminal to exit, but no errors showing in terminal... - But you warned us about that such glitches were possible, so no problem for now... The smileys are gone which is OK, the pass button has moved away from the play area, which is inconvenient.
I see 2 useful new features (not highlighted in the release notes in your above code: "Infinity" and The use of a region in Count Steps. Both I was able to find workarounds for in 1.1.16, but the former hopefully speeds things up, and the latter should simplify the code.
What you present as a code fragment would be needed to be part of an ifAfterwards statement. and for my simple game it does work with a few extra qualifications.
ie After placing a piece, ALL board locations must by connected to an EMPTY edge location.
Unfortunately the game that I couldn't get to work is still a problem: It requires that
1) To be placed, a piece must after placement, AND after the addition of another dummy piece in any location, must still be connected to an empty location at the adge of the board, and
2) After placement, any other piece belonging to either player is simultaneously removed, if a dummy piece can be placed in a way that prevents its connection to an empty edge of the board.
My overall logic for identifying the removal sites was something like the following restriction on a (to) ---
if:(all sites ( sites Empty ) if: (can Move (do ( add (to (site)) ifAfterwards: ( <something like your above code> )))))
And I can't seem to get this to compile (probably need to get the right workaround on the limitation on re-entry of functions / re-use of iterators)
(no specific errors are given)
The purpose is to check for the existence of 2 independent paths from each piece to the edge.
Had a couple hangs, including one after clicking pass before the game, in which resizing the window bottom still "worked" leaving black in the new area. And once where the window with the game flashed as if it was repeatedly closing and re-opening, and a few requiring ^C in the terminal to exit, but no errors showing in terminal... - But you warned us about that such glitches were possible, so no problem for now... The smileys are gone which is OK, the pass button has moved away from the play area, which is inconvenient.
I see 2 useful new features (not highlighted in the release notes in your above code: "Infinity" and The use of a region in Count Steps. Both I was able to find workarounds for in 1.1.16, but the former hopefully speeds things up, and the latter should simplify the code.
What you present as a code fragment would be needed to be part of an ifAfterwards statement. and for my simple game it does work with a few extra qualifications.
ie After placing a piece, ALL board locations must by connected to an EMPTY edge location.
Unfortunately the game that I couldn't get to work is still a problem: It requires that
1) To be placed, a piece must after placement, AND after the addition of another dummy piece in any location, must still be connected to an empty location at the adge of the board, and
2) After placement, any other piece belonging to either player is simultaneously removed, if a dummy piece can be placed in a way that prevents its connection to an empty edge of the board.
My overall logic for identifying the removal sites was something like the following restriction on a (to) ---
if:(all sites ( sites Empty ) if: (can Move (do ( add (to (site)) ifAfterwards: ( <something like your above code> )))))
And I can't seem to get this to compile (probably need to get the right workaround on the limitation on re-entry of functions / re-use of iterators)
(no specific errors are given)
The purpose is to check for the existence of 2 independent paths from each piece to the edge.