Beispiel #1
0
// Relative advantage for c with given board
func advantage(c *client.Client, b game.Board) int {
	black, white := b.Score()
	diff := black - white
	if c.Color() == game.White {
		diff = -diff
	}
	return diff
}
Beispiel #2
0
func score(c *client.Client) (black, white int) {
	black, white = c.State().Score()
	black += c.BlackStones().Captured
	white += c.WhiteStones().Captured
	return
}