Exemple #1
0
func Test_C4Game(t *testing.T) {
	assert := assert.Assert(t)
	game := GameWrapper{NewGame()}
	g := minimax.Game(game)
	assert.NotNil(g, "not nil")

	game1 := game.Copy()
	game1.Play(1)
	assert.NotEqual(game, game1)
}
Exemple #2
0
func TestDuplicatedID(t *testing.T) {
	assert := assert.Assert(t)

	var yml string
	var err error

	yml = loadFile("config_duplicated_id.yml")
	_, err = kasi.ParseConfig(yml)
	assert.NotNil(err)
}
Exemple #3
0
func Test_HasWonUtilityFuncion_implements_correct_inverface(t *testing.T) {
	assert := assert.Assert(t)
	solver := minimax.Solver{HasWon, 4, false}
	assert.NotNil(solver, "solver not nil")
}