diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-08-21 17:26:35 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-21 17:26:35 +0200 |
| commit | af168066174ee2e7172bd3acb16e316265c1189b (patch) | |
| tree | 38dd563a5e4d15a9896af2774e0760aa9d4f0a50 /go/ui | |
| parent | 14b14369c10abab2f0de2f7109735f95f1a4c94a (diff) | |
| download | muhqs-game-af168066174ee2e7172bd3acb16e316265c1189b.tar.gz muhqs-game-af168066174ee2e7172bd3acb16e316265c1189b.zip | |
add random map generation to the random challenge
Diffstat (limited to 'go/ui')
| -rw-r--r-- | go/ui/mapView.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/go/ui/mapView.go b/go/ui/mapView.go index 36455d8c..29b1ddd3 100644 --- a/go/ui/mapView.go +++ b/go/ui/mapView.go @@ -4,7 +4,6 @@ import ( "fmt" "image" "image/color" - "log" "math" "strings" "unicode" @@ -13,6 +12,7 @@ import ( "github.com/hajimehoshi/ebiten/v2/vector" "muhq.space/muhqs-game/go/assets" "muhq.space/muhqs-game/go/game" + "muhq.space/muhqs-game/go/log" ) var ( @@ -101,7 +101,7 @@ func (vw *MapView) handleStreet(x, y int, op *ebiten.DrawImageOptions) *ebiten.I // This street is not connected to anything. Seams odd! if connections == 0 { - log.Printf("Street at (%d, %d) is not connected", x, y) + log.Warn(fmt.Sprintf("Street at (%d, %d) is not connected", x, y)) img = assets.GetTile("street") } else if connections == 1 || (connections == 2 && ((left && right) || (above && below))) { @@ -149,7 +149,7 @@ func (vw *MapView) handleWall(x, y int, op *ebiten.DrawImageOptions) *ebiten.Ima // This wall is not connected to anything. Seams odd! if connections == 0 { - log.Printf("Wall at (%d, %d) is not connected", x, y) + log.Warn(fmt.Sprintf("Wall at (%d, %d) is not connected", x, y)) img = assets.GetTile("wall") } else if (connections == 1 || (connections == 2 && ((left && right) || (above && below)))) && @@ -259,7 +259,7 @@ func (vw *MapView) drawMapLayer(screen *ebiten.Image) { tileImg = assets.GetTile(tile.Raw) } if tileImg == nil { - log.Panic("failed to load tile", tile.Raw) + log.Panic("failed to load tile", "tile", tile.Raw) } op.GeoM.Translate(x_px, y_px) |
