Skip to content

One-djey/chess_verse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

219 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChessVerse

Description

A React-based chess game featuring multiple unique game modes inspired by various gaming cultures. Each mode introduces new rules, mechanics, or strategic twists on the classic game.

This application is 100% frontend — no backend, no database, no account required.

Play the Game

Play directly in your browser: chess.jeremy-maisse.com No installation needed — just open the link and start playing!

Features

  • Multiple game modes — Classic, Borderless, All Random, Assimilation.
  • Solo & vs AI — Play both sides yourself or face Stockfish at 10 difficulty levels (Beginner to Superhuman). In special modes, a smart fallback chain ensures the AI always plays a legal move even when Stockfish suggests a move that violates special-mode rules.
  • P2P multiplayer — Challenge a friend remotely via a shareable link, with no server involved (WebRTC).
  • Classic chess rules — Castling, pawn promotion, check detection, stalemate.
  • Visual indicators — Highlighted valid moves, selected piece, king in check (orange), assimilated pieces (green glow).
  • Assimilation mode — Pieces permanently acquire the movement abilities of pieces they capture; accumulated abilities visualised via hover tooltip.
  • Multilingual UI — English, French, Spanish, Italian, Arabic, Japanese, Chinese, Korean.
  • Feedback form — Send feedback directly from the Settings modal; generates a pre-filled mailto link, no backend needed.
  • Installable as a PWA — Add to home screen for quick access.
  • Endgame statistics — Match duration, move count, AI level, rematch option.
  • Player profile — Persistent stats page (/profile) with activity heatmap, win rate donut, ELO rank, favorite pieces, mode distribution, and unlockable achievements. All stored locally — no account required.

Game Modes

Mode Description
Classic Standard chess with all classic rules.
Borderless Pieces can cross board edges and reappear on the other side.
All Random Pieces are placed randomly at game start.
Assimilation A piece that captures another permanently acquires its movement abilities (cumulative).

Installation

To run the game locally:

  1. Clone the project
    git clone https://github.com/One-djey/chess_verse.git
  2. Navigate to the project folder
    cd chess_verse
  3. Install dependencies
    npm install
  4. Start the development server
    npm run dev

Testing

The project is covered by automated tests (Vitest + Testing Library), run in CI on every push/PR:

npm run test           # run the full suite once
npm run test:watch     # watch mode
npm run test:coverage  # with coverage thresholds on core modules

Technologies Used

  • React 18 — UI framework
  • TypeScript — Type safety
  • Vite — Build tool and dev server
  • Tailwind CSS — Styling
  • Stockfish — Chess AI engine (WebAssembly Web Worker)
  • Trystero — P2P connection via WebRTC (no signalling server)
  • react-i18next — Internationalisation

Contribution

Contributions to enhance the game are welcome!

Adding a New Game Mode

  1. Fork the repository and create a branch.
  2. Add a rules flag to GameMode in src/types/chess.ts.
  3. Register the mode in src/components/GameModes.tsx (gameModes[] array).
  4. Implement movement or board logic in src/utils/chess/moves.ts (guard on gameMode.rules).
  5. Add translations for the mode title and description in every src/i18n/locales/*.json file.
  6. Write the tests — every code change must ship its unit tests in the same commit (see docs/TEST_STRATEGY.md §8 for the policy); check that all other modes are unaffected.
  7. Submit a pull request describing the mode and its gameplay changes. CI (lint + tests + coverage thresholds + build + e2e) must be green.

License

This project is licensed under the MIT License.

About

Chess game with custom modes ♟️

Resources

Stars

Watchers

Forks

Contributors

Languages