1
0
Fork 0
microworlds/core/environment_test.go

25 lines
450 B
Go
Raw Permalink Normal View History

2019-08-03 02:00:33 +00:00
package core
import (
"testing"
)
func TestEnvironment_Mark(t *testing.T) {
2019-08-03 05:14:56 +00:00
env := NewEnvironment(3, 3)
env.Mark("test", 1, 1, 9)
env.Evaporate(0.9, "test")
2019-08-03 05:14:56 +00:00
for x := 0; x < 3; x++ {
for y := 0; y < 3; y++ {
t.Logf("mark(%d,%d) = %f", x, y, env.Sniff("test", x, y))
2019-08-03 02:00:33 +00:00
}
}
t.Logf("\n")
env.Evaporate(0.9, "test")
2019-08-03 05:14:56 +00:00
for x := 0; x < 3; x++ {
for y := 0; y < 3; y++ {
t.Logf("mark(%d,%d) = %f", x, y, env.Sniff("test", x, y))
2019-08-03 02:00:33 +00:00
}
}
}