last_light/game/model/empty_dungeon_level.go

38 lines
653 B
Go
Raw Normal View History

package model
import "mvvasilev/last_light/util"
type EmptyDungeonLevel struct {
2024-05-03 13:46:32 +03:00
level *BasicMap
}
func CreateEmptyDungeonLevel(width, height int) *EmptyDungeonLevel {
m := new(EmptyDungeonLevel)
2024-05-03 13:46:32 +03:00
tiles := make([][]Tile, height)
for h := range height {
2024-05-03 13:46:32 +03:00
tiles[h] = make([]Tile, width)
}
2024-05-03 13:46:32 +03:00
m.level = CreateBasicMap(tiles)
return m
}
func (edl *EmptyDungeonLevel) Size() util.Size {
2024-05-03 13:46:32 +03:00
return edl.level.Size()
}
func (edl *EmptyDungeonLevel) SetTileAt(x int, y int, t Tile) {
2024-05-03 13:46:32 +03:00
edl.level.SetTileAt(x, y, t)
}
func (edl *EmptyDungeonLevel) TileAt(x int, y int) Tile {
2024-05-03 13:46:32 +03:00
return edl.level.TileAt(x, y)
}
func (edl *EmptyDungeonLevel) Tick() {
}