delaunay/mst working

This commit is contained in:
2019-11-13 02:56:09 +03:00
parent f55549a048
commit d7b24d5abc
17 changed files with 589 additions and 40 deletions

View File

@ -3,7 +3,7 @@ package gamemap
import (
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
"lab.zaar.be/thefish/alchemyst-go/engine/types"
"lab.zaar.be/thefish/alchemyst-go/util"
"lab.zaar.be/thefish/alchemyst-go/util/appctx"
)
//fixme move to config
@ -13,12 +13,12 @@ var mapHeight = 90
type Level struct {
types.Rect
ctx util.ClientCtx
Name string
Branch string
Depth int
Objects *[]ecs.Entity
Tiles []*Tile
ctx appctx.ClientCtx
Name string
Branch string
Depth int
Objects *[]ecs.Entity
Tiles []*Tile
}
func (l *Level) GetTile (coords types.Coords) *Tile {
@ -63,7 +63,7 @@ func (l *Level) Put (x, y int, tileFunc interface{}) {
}
}
func NewLevel(ctx util.ClientCtx, branch string, depth int) *Level {
func NewLevel(ctx appctx.ClientCtx, branch string, depth int) *Level {
l := &Level{
ctx: ctx,
Name: branch + string(depth),