@@ -18,13 +18,13 @@ type Config struct {
1818}
1919
2020var (
21- cursorRow , cursorCol int
21+ cursorRow , cursorCol int8
2222 gui game.Gui
2323 keybindings map [string ]string
2424 prevBoard * game.Board // Track previous board for Ko rule
25- currentPlayer int = 1 // Track current player (1 or 2), start with Black
25+ currentPlayer int8 = 1 // Track current player (1 or 2), start with Black
2626 koPoint * game.Point // Track Ko point (nil if no Ko)
27- passCount int // Track consecutive passes
27+ passCount int8 // Track consecutive passes
2828 gameOver bool // Track if the game is over
2929 engineEnabled bool // Play against engine if true
3030 selectedEngine engine.Engine // The engine instance
@@ -70,7 +70,7 @@ func layout(g *gocui.Gui) error {
7070 return nil
7171}
7272
73- func moveCursor (dRow , dCol int , jumpOverOccupied bool ) func (* gocui.Gui , * gocui.View ) error {
73+ func moveCursor (dRow , dCol int8 , jumpOverOccupied bool ) func (* gocui.Gui , * gocui.View ) error {
7474 return func (g * gocui.Gui , v * gocui.View ) error {
7575 nextRow , nextCol := cursorRow , cursorCol
7676 for {
@@ -191,7 +191,7 @@ func placeStone(g *gocui.Gui, v *gocui.View) error {
191191 // Ko rule and legality check: resulting board must not match prevBoard
192192 if prevBoard != nil {
193193 same := true
194- for i := range nextBoard {
194+ for i := int8 ( 0 ); i < int8 ( len ( nextBoard )); i ++ {
195195 if nextBoard [i ] != (* prevBoard )[i ] {
196196 same = false
197197 break
0 commit comments