09-19-2023, 03:26 AM
(This post was last modified: 09-19-2023, 03:35 AM by dale walton.)
I would like to use Patterns to find patterns of empty spaces.
Currently in whats, 0 means anything, correct?
But is there a number to represent specifically the space should be empty? and is there a number to represent that the space should be occupied by any player?
In the particular game Affinage) I want to find empty cross-shapes next to the last piece played and then check whether they are fully surrounded orthogonally as well as equally surrounded by both players in a specified direction (e.g. adjacent or orthogonal) This will allow me to eliminate some ifAfterwards:(can move ... ) checks which are very time consuming.
In the hex version it is open tripplets surrounded by a ring of pieces in a particular sequence that needs checking.
Currently in whats, 0 means anything, correct?
But is there a number to represent specifically the space should be empty? and is there a number to represent that the space should be occupied by any player?
In the particular game Affinage) I want to find empty cross-shapes next to the last piece played and then check whether they are fully surrounded orthogonally as well as equally surrounded by both players in a specified direction (e.g. adjacent or orthogonal) This will allow me to eliminate some ifAfterwards:(can move ... ) checks which are very time consuming.
In the hex version it is open tripplets surrounded by a ring of pieces in a particular sequence that needs checking.