v0.1.0 chess game in go, using external stockfish engine

This commit is contained in:
2025-10-26 17:34:50 -04:00
commit 8ba4357920
15 changed files with 1433 additions and 0 deletions

View File

@ -0,0 +1,29 @@
// FILE: internal/transport/transport.go
package transport
import (
"chess/internal/board"
"chess/internal/core"
"chess/internal/game"
)
// Handler processes user commands independent of transport medium
type Handler interface {
HandleNewGame(id string, fen string, whiteType, blackType core.PlayerType) error
HandleMove(gameID, move string) error
HandleUndo(gameID string) error
HandleGetBoard(gameID string) (*board.Board, error)
HandleGetGame(gameID string) (*game.Game, error)
}
// View abstracts display/output operations
type View interface {
DisplayBoard(b *board.Board)
ShowMessage(msg string)
ShowError(err error)
ShowGameHistory(g *game.Game)
ShowComputerMove(player core.Color, move string, depth, score int)
ShowHumanMove(move string)
ShowGameOver(state core.State)
ShowPrompt(prompt string)
}