Discover Packages
github.com/Flokey82/go_gens
genfloortxt
package
Version:
v0.0.0-...-8d0fdad
Opens a new window with list of versions in this module.
Published: Nov 16, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
README
¶
Simple 2D Text Floorplan Renderer in Golang (WIP)
This package provides a little demo on how to 'render' walls as unicode characters, imitating the cp437 symbol set.
Map!
Expand ▾
Collapse ▴
Documentation
¶
Package genfloortxt renders a primitive floor plan read from an ASCII file to the console.
NOTE: In future I plan to add some procedural generation bits to it.
View Source
const (
CellWall = '#'
CellWindow = 'W'
CellDoor = 'D'
)
type Plan struct {
Height int
Width int
}
Plan represents a parsed floorplan.
ReadPlan reads a floor plan from the given reader.
Render 'renders' the floor plan to an array of strings.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.