![]() |
A way to check for loop without adjacencies - Printable Version +- Ludii Forum (https://ludii.games/forums) +-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13) +--- Forum: About the Ludii Grammar (https://ludii.games/forums/forumdisplay.php?fid=15) +--- Thread: A way to check for loop without adjacencies (/showthread.php?tid=53) |
A way to check for loop without adjacencies - Johnlanders - 05-07-2020 Hello I'm working on a game now but I can't figure out how to make it work. I need away to check is a piece of one player is in zone delimited by the opponent piece but they don't have to be adjacent to each other. I tried with the isLoop function but I can't make it work, seems like the adjacencies criterion is mandatory. Thanks by advance. RE: A way to check for loop without adjacencies - DennisSoemers - 05-08-2020 I'm not 100% sure exactly what you're looking for. Is it one of the following, or something else? 1. A ludeme that tells you, for a given player, whether there exists some piece owned by that player that is encircled by opposing pieces like you described? 2. A ludeme that tells for, for a specific piece of a player (so in one specific site), whether that particular piece is encircled by opposing pieces in the way you described? RE: A way to check for loop without adjacencies - Johnlanders - 05-10-2020 In fact in the game I'm working on you put your piece on the board, when an area is formed by your piece, and if your opponent as a piece in this area you can capture it. The area is defined by piece following the line of the board. For example if it the area is a square your piece are on the vertexes of this square, and if your opponent as a piece in this square you can capture it. |