github ↗

The foundation. ChessCommon is the shared chess brain that every other service in the system now stands on. It is not about seeing, organizing, relaying, or rendering — it is simply about what chess is: the board, the pieces, the rules, and the set of moves that legally exist.

It is a single Java library — one package, game — that depends on nothing. The camera sees, the SOM layers organize, the vector server relays, the board renders; but all of them agree on the same model of the game, and that agreement lives here.

repository

github.com/brackishbert-coder/ChessCommon ↗

what's inside
Board · BoardSnapshot · tile · Piece · PieceType · Color · Move · vector — the 8×8 world and the things that stand on it.
BoardUtils — builds the board, holds turn state, and answers questions about the position.
VectorMoveValidator — piece movement rules, captures, and legality. The last word on whether a move is even allowed.
LegalMoveLibrary — the catalogue of moves that actually exist on a board, so the neural layers emit playable candidates instead of arbitrary numbers.
GameStats — tracks the running game: wins, draws, longest and shortest games, turns.
VectorToBoardTranslator — turns a normalized vector into discrete board coordinates.
the knot it untied

Before ChessCommon, the board reached into the SOM layer for its legal-move library, and the SOM layer reached back into the board for its model — a circular dependency. Each project needed the other to compile, which is something a build tool can never order, so the whole system would only build inside the IDE. ChessCommon is that knot pulled loose: the shared domain was lifted into one module that depends on nothing, and BoardTemplate, Test4, and VectorServer now depend on it instead of on each other. The dependency graph became acyclic, and the system compiled from the command line for the first time.

compiling the whole system

Build order matters: the foundation goes in first, or nothing downstream resolves. With it installed, every service builds on its own.

# 1 · the shared foundation — install first, depends on nothing cd ChessCommon && mvn install # 2 · supporting libraries cd ../SOM && mvn install cd ../CameraServer&& mvn install # needs the local OpenCV jar cd ../test3 && mvn install # 3 · the services — each depends on ChessCommon, never on each other cd ../BoardTemplate && mvn compile cd ../test4 && mvn compile cd ../VectorServer && mvn compile

In Eclipse it is simpler still: the services read their pom.xml through m2e, so importing ChessCommon and running Maven → Update Project on the rest wires everything together — no hand-edited classpaths.

shared core chess rules domain model legal moves foundation java
active

common(adj.) held by all, owned by none. the sixty-four squares belong to everyone who ever learned them, and to no one.

1. e4a sentence understood in every language, exchanged between people who share no other word.

the game is older than the borders that claim it; the rules outlived the empires that wrote them down.

½–½two strangers, no common tongue — and still, they share the opening.

what every service here depends on is what every player always has: that we agree, before the first move, on what the board even is.