Sha256: fcb1950a7ef9d550c72f11dd9d7b64b4f1d59e9598a920571d3f611b61231071

Contents?: true

Size: 1.22 KB

Versions: 74

Compression:

Stored size: 1.22 KB

Contents

# Go Counting

Count the scored points on a Go board.

In the game of go (also known as baduk, igo, cờ vây and wéiqí) points
are gained by completely encircling empty intersections with your
stones. The encircled intersections of a player are known as its
territory.

Write a function that determines the territory of each player. You may
assume that any stones that have been stranded in enemy territory have
already been taken off the board.

Multiple empty intersections may be encircled at once and for encircling
only horizontal and vertical neighbours count. In the following diagram
the stones which matter are marked "O" and the stones that don't are
marked "I" (ignored).  Empty spaces represent empty intersections.

```text
+----+
|IOOI|
|O  O|
|O OI|
|IOI |
+----+
```

To be more precise an empty intersection is part of a player's territory
if all of its neighbours are either stones of that player or empty
intersections that are part of that player's territory.

For more information see
[wikipedia](https://en.wikipedia.org/wiki/Go_%28game%29) or [Sensei's
Library](http://senseis.xmp.net/).


## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.118 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.117 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.116 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.115 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.114 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.113 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.111 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.110 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.109 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.108 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.107 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.106 tracks/csharp/exercises/go-counting/README.md
trackler-2.2.1.105 tracks/csharp/exercises/go-counting/README.md