10-26-2020, 11:17 AM
I have been trying to make my game work with the new group iteration, but I'm stuck. The fact that it only iterates over the groups owned by the mover seems to make it useless for my purposes.
What I have been trying to do is to give each player a score equal to the sum of the values of each of their groups, where the value of a group is some function of the number of 2-stacks it contains.
In order to do this I have to iterate over groups and, for each group add the value of that group to the relevant player's score. In order not to add the same values over and over each turn, I make sure I only calculate the score after the (pass) that ends the game. But I realized that only the groups of the player that made the last (pass) gets counted, so I am not able to calculate the score of each player.
I have attached a .lud with the game, but this code would only have worked if the new ludeme iterated over all groups. Another way it could work is if I could choose whose groups to iterate over. Maybe one can with "if:", but I don't understand how it works..
Is there a way of doing what I want with the new ludeme as is?
What I have been trying to do is to give each player a score equal to the sum of the values of each of their groups, where the value of a group is some function of the number of 2-stacks it contains.
In order to do this I have to iterate over groups and, for each group add the value of that group to the relevant player's score. In order not to add the same values over and over each turn, I make sure I only calculate the score after the (pass) that ends the game. But I realized that only the groups of the player that made the last (pass) gets counted, so I am not able to calculate the score of each player.
I have attached a .lud with the game, but this code would only have worked if the new ludeme iterated over all groups. Another way it could work is if I could choose whose groups to iterate over. Maybe one can with "if:", but I don't understand how it works..
Is there a way of doing what I want with the new ludeme as is?