26 lines
490 B
Go
26 lines
490 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
|
||
|
// ~~~~~~~~~~~~~~~
|
||
|
//
|
||
|
// /---+---+---\
|
||
|
// | X | O | X |
|
||
|
// +---+---+---+
|
||
|
// | O | X | O |
|
||
|
// +---+---+---+
|
||
|
// | X | O | X |
|
||
|
// \---+---+---/
|
||
|
}
|