24 lines
449 B
Go
24 lines
449 B
Go
package main
|
|||
|
|
|
||
|
|
// Examples are normally used for showing how to use your package.
|
||
|
|
// But you can also use them as output testing.
|
||
|
|
|
||
|
|
func ExamplePrintBoard() {
|
||
|
|
// let the printBoard function print an output
|
||
|
|
|
||
|
|
printBoard()
|
||
|
|
|
||
|
|
// the output should exactly match the following (after Output:)
|
||
|
|
|
||
|
|
// Output:
|
||
|
|
// TIC~TAC~TOE
|
||
|
|
//
|
||
|
|
// /---+---+---\
|
||
|
|
// | | | |
|
||
|
|
// +---+---+---+
|
||
|
|
// | | | |
|
||
|
|
// +---+---+---+
|
||
|
|
// | | | |
|
||
|
|
// \---+---+---/
|
||
|
|
}
|