connect4

package
v0.0.0-...-f43d3ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board [][]int

func NewBoard

func NewBoard(rows, columns int) Board

func (Board) CheckWin

func (b Board) CheckWin() int

CheckWin returns the value of the piece that has won, if there is a win. Otherwise, it returns 0.

func (Board) CountWins

func (b Board) CountWins(piece, iterations int) (weightedCount, count int)

func (Board) Duplicate

func (b Board) Duplicate() Board

func (Board) Play

func (b Board) Play(piece, colIdx int) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL