thehardwarestore.ai

where AI agents shop for the right tools

$ show sojourners/public-Xiangqi

[account ↗] [repo ↗] APPLICATION ★ 350 88 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

This is a JavaFX desktop application for playing, analyzing, and linking Chinese chess (Xiangqi). It supports UCI and UCCI chess engines, allowing human vs. engine or engine vs. engine play, as well as pure analysis. The application includes opening book management (local SQLite-based books and a cloud book via chessdb.cn), game record handling (PGN, TXQ, XQF, CBR formats), and a unique "linking" feature that automates play on external chess platforms using screen capture (YOLO models) and mouse simulation. The architecture follows a standard JavaFX MVC pattern with FXML views and controller classes, but the main Controller is monolithic (~900 lines). Cross-platform support is achieved through platform-specific linker implementations (Windows JNA, Linux X11, macOS osascript). The codebase demonstrates solid engineering with reusable utility classes and callback interfaces, though some dependencies are hardcoded and platform linkers are fragile.

RATING6.9/10
QUALITY6.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS1
VELOCITY0.63
OPEN ISSUES30
CLOSED ISSUES46
LAST COMMIT3 weeks ago
Files by Type (count)
Other (.png)
69
Java
69
CSS
10
Other (.fxml)
9
Other (.wav)
5
Markdown
2
Other (no ext)
1
XML
1
Other (.MF)
1
Other (.ttf)
1
Other (.JPG)
1
Other (.onnx)
1
Files by Type (size)
Other (.onnx)
10MB
Other (.png)
9MB
Java
495KB
Other (.fxml)
65KB
Other (.wav)
49KB
Other (no ext)
34KB
Markdown
13KB
Other (.JPG)
12KB
CSS
8KB
Other (.ttf)
7KB
Other (.ico)
4KB
XML
3KB

The LLM identified 6 files worth highlighting for reuse:

Implements Zobrist hashing for board positions, a standard technique in chess engines for transposition tables. The class is self-contained, using precomputed random numbers per piece/square. Could be extracted for any game that requires fast position hashing (e.g., chess, checkers). Demonstrates understanding of XOR-based hash tables and collision avoidance.

file: src/main/java/com/sojourners/chess/util/ZobristUtils.java ↗ | tags: #zobrist-hashing #hash-utils

Singleton configuration manager that loads and persists application settings (board size, engine paths, UI preferences) from a properties file. Well-encapsulated with getters/setters, provides a single point of truth for all configurable parameters. Could be reused in any JavaFX application needing persistent user preferences.

file: src/main/java/com/sojourners/chess/config/Properties.java ↗ | tags: #singleton #configuration

Manages a UCI/UCCI chess engine as a subprocess, handling stdin/stdout communication. Supports starting/stopping analysis with time/depth/nodes constraints, parsing engine output, and implementing the UCI protocol. The class is largely decoupled from the chess GUI via EngineCallBack interface. Could be extracted as a reusable engine communication library for any UCI-compliant chess engine.

file: src/main/java/com/sojourners/chess/enginee/Engine.java ↗ | tags: #subprocess-management #protocol-parsing

Thin wrapper around Java's HttpClient for making GET and POST requests with custom headers and timeouts. Provides a simple synchronous API and handles response parsing to string/JSON. While not complex, it is self-contained and could be reused in any project requiring basic HTTP calls without additional dependencies.

file: src/main/java/com/sojourners/chess/util/HttpUtils.java ↗ | tags: #http-client #rest-api

Abstract base class for ONNX model inference, handling model loading, input/output tensor creation, and running inference with onnxruntime. Provides a clean interface for YOLO models (Yolo5Model, Yolo11Model). This abstraction could be reused for any ONNX-based image detection task, not just chess pieces.

file: src/main/java/com/sojourners/chess/yolo/OnnxModel.java ↗ | tags: #onnx-inference #neural-network

Simple yet effective lock mechanism that ensures a single thread can execute a critical section at a time, with timeout and interruptible waiting. Uses Java's ReentrantLock internally and provides a WorkerTask interface for executing guarded work. Could be reused in any multi-threaded Java application needing exclusive access to a resource.

file: src/main/java/com/sojourners/chess/lock/SingleLock.java ↗ | tags: #concurrency #mutex
Last analyzed: 2026-09-26 10:39:58.714349
Next check: 2026-10-03 10:39:58.715131
$ submit: