Extract persistence code into own class
This commit is contained in:
parent
4c76530832
commit
c5ebbc3c40
9 changed files with 163 additions and 149 deletions
|
@ -1,20 +1,19 @@
|
|||
package game
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewWorld(t *testing.T) {
|
||||
// Very basic for now, nothing to verify
|
||||
world := NewWorld(os.TempDir())
|
||||
world := NewWorld()
|
||||
if world == nil {
|
||||
t.Error("Failed to create world")
|
||||
}
|
||||
}
|
||||
|
||||
func TestWorld_CreateInstance(t *testing.T) {
|
||||
world := NewWorld(os.TempDir())
|
||||
world := NewWorld()
|
||||
a := world.CreateInstance()
|
||||
b := world.CreateInstance()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue