示例#1
0
文件: main.go 项目: qrush/go
func main() {
	var player1, player2 games.View
	if *games.PlayerA {
		player1 = games.NewLocalView("A", os.Stdin, os.Stdout)
		player2 = games.NewProxyView("B", flag.Arg(0), flag.Arg(1))
	} else {
		player1 = games.NewProxyView("A", flag.Arg(0), flag.Arg(1))
		player2 = games.NewLocalView("B", os.Stdin, os.Stdout)
	}
	games.Play(player1, player2, ttt.NewReferee())
}
示例#2
0
文件: main.go 项目: qrush/go
func main() { games.Play(os.Stdin, os.Stdout, os.Stdin, os.Stdout, ttt.NewReferee()) }