v0.2.0 transitioned to api-only, extended and improved features, docs and tests added

This commit is contained in:
2025-10-29 23:28:19 -04:00
parent b98ea83012
commit 0ad608293e
32 changed files with 3683 additions and 1670 deletions

View File

@ -1,7 +1,7 @@
<table>
<tr>
<td>
<h1>Go Chess</h1>
<h1>Go Chess API</h1>
<p>
<a href="https://golang.org"><img src="https://img.shields.io/badge/Go-1.24-00ADD8?style=flat&logo=go" alt="Go"></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/License-BSD_3--Clause-blue.svg" alt="License"></a>
@ -10,39 +10,60 @@
</tr>
</table>
# Go Chess
# Chess
A command-line chess application written in Go.
Go backend server providing a RESTful API for chess gameplay. Integrates Stockfish engine for move validation and AI opponents.
## Features
* Command-line interface for gameplay.
* Uses an stockfish external chess engine for move validation and computer play.
* Supports player vs. player, player vs. computer, and computer vs. computer modes.
* Start a new game from the standard starting position.
* Resume a game from a FEN (Forsyth-Edwards Notation) string.
* Move history display.
* Move undo functionality.
- RESTful API for chess operations
- Stockfish engine integration for validation and AI
- Human vs human, human vs computer, computer vs computer modes
- Custom FEN position support
- Asynchronous AI move calculation
- Configurable AI strength and thinking time
## System Requirements
## Requirements
* **Go Version**: 1.24+ (for building from source)
* **Engine**: Requires the **Stockfish** chess engine to be installed. The `stockfish` executable must be available in the system's PATH.
- Go 1.24+
- Stockfish chess engine (`stockfish` in PATH)
### Installation
```bash
# Arch Linux
yay -S stockfish
# FreeBSD
pkg install stockfish
```
## Quick Start
To build and run the application:
```bash
git clone https://git.lixen.com/lixen/chess
cd chess
go build ./cmd/chessd
```sh
# Build the executable
go build ./cmd/chess
# Standard mode (1 request/second/IP)
./chessd
# Run the application
./chess
# Development mode (10 requests/second/IP)
./chessd -dev
# Run tests (requires dev mode)
./test/test-api.sh
```
Inside the application, type `help` to see available commands.
Server listens on `http://localhost:8080`. See [API Reference](./doc/api.md) for endpoints.
## Documentation
- [API Reference](./doc/api.md) - Endpoint specifications
- [Architecture](./doc/architecture.md) - System design
- [Development](./doc/development.md) - Build and test instructions
- [Stockfish Integration](./doc/stockfish.md) - Engine communication
## License
BSD 3-Clause License
BSD 3-Clause