How jaiparwani-cyber/mlc works
This is a browser-based multiplayer chess game for two to six players. A player chooses the game size, then App initializes player matrices and an opponent-facing board. During play, the current player selects pieces and destinations; App delegates move legality to the rules module, updates player state, removes players whose kings are gone, rotates turns, and displays the winner. The board renders pieces and lets players switch opponents. The README is only Create React App boilerplate; architecture is based on the sampled source and tree.
Main entry points: App.js Game coordinator · ChessBoard.js Chess board · LandingPage.js Game setup · rules.js Chess rules
Components 8
Game interface
- React entry
src/index.js - Game setup
src/components/LandingPage.js - Chess board
src/components/ChessBoard.js - Winner display
src/components/Winner.js
Game control
- Game coordinator
src/App.js
Rules and pieces
- Chess rules
src/rules.js - Piece images
src/assests/index.js
Other components
- Player
Connections 12
- Player → Game setup: chooses players
- React entry → Game coordinator: renders
- Game coordinator → Game setup: shows setup
- Game setup → Game coordinator: starts game
- Game coordinator → Chess board: passes game state
- Player → Chess board: selects cells
- Chess board → Game coordinator: reports clicks
- Chess board → Game coordinator: changes opponent
- Game coordinator → Chess rules: validates move
- Chess rules → Game coordinator: returns legality
- Game coordinator → Winner display: shows winner
- Chess board → Piece images: reads image map