Refactor into server object to handle registered accounts
This commit is contained in:
parent
eccb726f74
commit
93decc027b
13 changed files with 304 additions and 128 deletions
24
pkg/game/world_test.go
Normal file
24
pkg/game/world_test.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package game
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewWorld(t *testing.T) {
|
||||
// Very basic for now, nothing to verify
|
||||
world := NewWorld()
|
||||
if world == nil {
|
||||
t.Error("Failed to create world")
|
||||
}
|
||||
}
|
||||
|
||||
func TestWorld_CreateInstance(t *testing.T) {
|
||||
world := NewWorld()
|
||||
a := world.CreateInstance()
|
||||
b := world.CreateInstance()
|
||||
|
||||
// Basic duplicate check
|
||||
if a == b {
|
||||
t.Errorf("Created identical instances")
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue