game

package
v0.0.0-...-4f046f1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

README

This is a non-optimized code that generates all the winning possibilities for a player

$ go run main.go | tail
[8 1 2 3 6 4 5 0 7]
[8 1 2 3 6 0 5 4 7]
[8 1 2 4 5 3 6 0 7]
[8 1 2 4 5 0 6 3 7]
[8 1 2 4 6 3 5 0 7]
[8 1 2 4 6 0 5 3 7]
[8 1 2 0 5 3 6 4 7]
[8 1 2 0 5 4 6 3 7]
[8 1 2 0 6 3 5 4 7]
[8 1 2 0 6 4 5 3 7]


$ go run main.go | wc -l
  243936

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate() chan []int

Generate all the positions 1 starts the game

Example
c := Generate()
for v := range c {
	fmt.Println(v)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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