コード例 #1
0
ファイル: ai_test.go プロジェクト: spadin/tictactoe
func (t *testAiPlayerSuite) TestPlayWinningMove() {
	board, player := aiPlayerSuiteSetup()
	game.MakeMoves(board, 0, 4, 1, 5)
	move := player.Play()
	t.Equal(2, move)
}
コード例 #2
0
ファイル: ai_test.go プロジェクト: spadin/tictactoe
func (t *testAiPlayerSuite) TestPlayGameTyingMove() {
	board, player := aiPlayerSuiteSetup()
	game.MakeMoves(board, 0, 1, 2, 4, 3, 5, 7, 6)
	move := player.Play()
	t.Equal(8, move)
}