Note that there are some explanatory texts on larger screens.

plurals
  1. POFinding the amount of liberties a stone has left?
    primarykey
    data
    text
    <p>I am making a game based of the asian board game called "go". I am currently trying to implement the capturing system. Basically once all of the liberties a stone has have been surrounded by the enemy the stone is taken. In the screenshot the black stone should be removed. <a href="https://imgur.com/unHEdko" rel="nofollow noreferrer">http://imgur.com/unHEdko</a></p> <p><img src="https://i.stack.imgur.com/Evo9y.png" alt="enter image description here"></p> <p>As well, if you connect stone together the liberties are combined, for example this is how you would capture two stones. <a href="https://imgur.com/pPBVRkC" rel="nofollow noreferrer">http://imgur.com/pPBVRkC</a> also here is another example of black being captured. /lbg8BsC</p> <p><img src="https://i.stack.imgur.com/AFBy4.png" alt="enter image description here"></p> <p>I have a 2D array thats 19x19 that stores all my stone locations. Black is represented by 1 while white is 2. This is my array print out from the first image. </p> <pre><code>0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000002000000000 0000000021200000000 0000000002000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 0000000000000000000 </code></pre> <p>As you can see the black stone in the middle is surrounded by white stones. In this case it easy to check if that stone is surrounded, but I don't know how to do it once you have multiple stones like in the two other screen shots above. Any help is greatly appreciated. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload