summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-07-17 23:31:07 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-07-17 23:31:07 -0400
commit1fd83f1656b0e16366c0cbaa98e5fc802238f022 (patch)
tree528af35d242146bc9928cd9387daa349a081cd98 /main.go
parent3d6f05e213247faf41cdebec01016cd99e7ededd (diff)
LESS LINES OF CODEEEEHEADmaster
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/main.go b/main.go
index 9e8b22b..68939db 100644
--- a/main.go
+++ b/main.go
@@ -54,11 +54,9 @@ func mkPixelStack(top, bot pixel) string {
case noTop && noBot:
return " "
case noTop:
- return fmt.Sprintf(botFmt+postFmt,
- bot.r, bot.g, bot.b)
+ return fmt.Sprintf(botFmt+postFmt, bot.r, bot.g, bot.b)
case noBot:
- return fmt.Sprintf(topFmt+postFmt,
- top.r, top.g, top.b)
+ return fmt.Sprintf(topFmt+postFmt, top.r, top.g, top.b)
default:
return fmt.Sprintf(topFmt+botFmt+postFmt,
top.r, top.g, top.b,
@@ -77,8 +75,7 @@ func (p pixelArt) draw(stream io.Writer) {
if p.height%2 != 0 {
for i := range top {
- top[i] = pixel{0, 0, 0}
- bot[i] = int2Pixel(p.pixels[0])
+ top[i], bot[i] = pixel{0, 0, 0}, int2Pixel(p.pixels[0])
}
drawRowStack(top, bot)
topIdx += step