clone

fifteen puzzle games for the terminal, with daily puzzles, weekly ladders and xp, built on bubble tea

fix lint

Dami committed f65b7c4
commit
f65b7c4853af69f63940ac5c592a8ebf56d21fb9
parent
35d88ce1dba67c31115ba0cf8f250591bbcc3e78
author
Dami <dami.etoile@gmail.com>
3 files changed, +4 -78
Mhashiwokakero/style.go46++----------------------------
Msudokurgb/generator.go34----------------------
Msudokurgb/style.go2+-
M hashiwokakero/style.go +3 -43
@@ -11,6 +11,7 @@ import (
1111 )1212 1313 const cellWidth = 514+1415 const islandPillWidth = game.DynamicGridCellWidth1516 1617 type cellVisual struct {
@@ -51,46 +52,6 @@ func baseCellStyle(fg, bg color.Color, bold bool) lipgloss.Style {
5152 return style5253 }5354 54-func selectedIslandStyle() lipgloss.Style {55- bg := theme.Current().SelectionBG56- return lipgloss.NewStyle().57- Width(islandPillWidth).58- AlignHorizontal(lipgloss.Center).59- Foreground(theme.TextOnBG(bg)).60- Background(bg).61- Bold(true)62-}63-64-func satisfiedIslandStyle() lipgloss.Style {65- p := theme.Current()66- return lipgloss.NewStyle().67- Width(islandPillWidth).68- AlignHorizontal(lipgloss.Center).69- Foreground(theme.TextOnBG(p.SuccessBG)).70- Background(p.SuccessBG).71- Bold(true)72-}73-74-func overfilledIslandStyle() lipgloss.Style {75- p := theme.Current()76- return lipgloss.NewStyle().77- Width(islandPillWidth).78- AlignHorizontal(lipgloss.Center).79- Foreground(theme.TextOnBG(p.ErrorBG)).80- Background(p.ErrorBG).81- Bold(true)82-}83-84-func adjacentIslandStyle() lipgloss.Style {85- bg := adjacentIslandBackground()86- return lipgloss.NewStyle().87- Width(islandPillWidth).88- AlignHorizontal(lipgloss.Center).89- Foreground(theme.TextOnBG(bg)).90- Background(bg).91- Bold(true)92-}93-9455 func bridgeColors() []color.Color {9556 return theme.Current().ThemeColors()9657 }
@@ -341,8 +302,7 @@ func bridgeBold(m Model, bridge game.DynamicGridBridge) bool {
341302 }342303 343304 func bridgeIndexForDynamicBridge(p *Puzzle, bridge game.DynamicGridBridge) int {344- count, index := dynamicBridgeIdentity(p, bridge)345- _ = count305+ _, index := dynamicBridgeIdentity(p, bridge)346306 return index347307 }348308
@@ -351,7 +311,7 @@ func bridgeCountForDynamicBridge(p *Puzzle, bridge game.DynamicGridBridge) int {
351311 return count352312 }353313 354-func dynamicBridgeIdentity(p *Puzzle, bridge game.DynamicGridBridge) (count int, index int) {314+func dynamicBridgeIdentity(p *Puzzle, bridge game.DynamicGridBridge) (int, int) {355315 for i := 0; i < bridge.Count; i++ {356316 cell := p.CellContent(bridge.Cells[i].X, bridge.Cells[i].Y)357317 switch cell.Kind {
M sudokurgb/generator.go +0 -34
M sudokurgb/style.go +1 -1