06-08-2021, 11:02 AM
(This post was last modified: 06-08-2021, 11:43 AM by slimy_asparagus.)
Okay I have formulated a simple game idea where I can test whether I can partially reset a game state at the start of the player's turn. However I have hit an issue, before I have got as far as needing a (do.....) ludeme.
I have a 9x9 board with an initial board somewhat full of pieces. At the start of a player's turn each piece has its range reset to 1.
A piece moves and captures like a queen but restricted to its range. Each time a piece captures that piece gets an increment to its range, and also the player gets another go. In addition pieces with a range greater than 1, protect pieces within their range.
So far in my implementation I have only managed to get the range and its increment working. I have not yet attempted the extra moves, the reset of ranges to 1 or the protective features.
Also I could not find a way to update the range directly (and to get it to only update if there is a capture). I had to store it temporarily in (var).
So my major problem is that in the attached trial the piece with range 5 cannot successfully capture anything. It just hangs there.
Also when I test (var) in the Test dialog it is always 0, even though I can see it is being updated.
Also when I try to test this code in the TEst Dialog I don't get the correct results:
So I have managed to do the (do.....) ludeme (after limiting the state to maximum 4) and in this case it works (Range2). So I shall need to revisit my initial issue. I would appreciate some insight to the issues I have had with this experiment.
I have a 9x9 board with an initial board somewhat full of pieces. At the start of a player's turn each piece has its range reset to 1.
A piece moves and captures like a queen but restricted to its range. Each time a piece captures that piece gets an increment to its range, and also the player gets another go. In addition pieces with a range greater than 1, protect pieces within their range.
So far in my implementation I have only managed to get the range and its increment working. I have not yet attempted the extra moves, the reset of ranges to 1 or the protective features.
Also I could not find a way to update the range directly (and to get it to only update if there is a capture). I had to store it temporarily in (var).
So my major problem is that in the attached trial the piece with range 5 cannot successfully capture anything. It just hangs there.
Also when I test (var) in the Test dialog it is always 0, even though I can see it is being updated.
Also when I try to test this code in the TEst Dialog I don't get the correct results:
Code:
(forEach (sites Occupied by:Next) if:(< 1 (state at:(site))))
So I have managed to do the (do.....) ludeme (after limiting the state to maximum 4) and in this case it works (Range2). So I shall need to revisit my initial issue. I would appreciate some insight to the issues I have had with this experiment.