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)
|
2019-08-03 17:46:48 +00:00
|
|
|
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++ {
|
2019-08-03 17:46:48 +00:00
|
|
|
t.Logf("mark(%d,%d) = %f", x, y, env.Sniff("test", x, y))
|
2019-08-03 02:00:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
t.Logf("\n")
|
2019-08-03 17:46:48 +00:00
|
|
|
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++ {
|
2019-08-03 17:46:48 +00:00
|
|
|
t.Logf("mark(%d,%d) = %f", x, y, env.Sniff("test", x, y))
|
2019-08-03 02:00:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|