Chess game written in React
https://snaumov.github.io/react_chess
Chess app, written with React & Redux.
Consists of
- Frontend JavaScript web-application
- Backend Node.JS chess server
Features:
- Play game with engine (api.underwaterchess.com is used)
- Analysis mode (or play with human opponent on the same computer)
- Network game (play with human player on another computer)
React-Router is used to switch between different components, in total three routes are available
class AppComponent extends React.Component {
render() {
return (
<div className={this.props.ui.lightBackground ? "App lightBackground" : "App darkBackground"}>
<Router history = {browserHistory}>
<Route path="/" component={AppMainView} />
<Route path="/engine" component={AppInGameView} />
<Route path="/analysis" component={AppAnalysisView} />
<Route path="/arena/:gameID" component={AppArenaView} />
</Router>
</div>
)
};
}
Player can play only one game at a time
All three modes mainly consist of these features:
- Can win by either opponent resignation or checkmate
- Can resign (Network game will be resigned if player left the game page)
UI features:
- Can see game history and navigate back and forth in time
- Can change username
Download archive, then
npm install
npm start
to install frontend application
cd server/arena
npm install
node src/index.js
to install backend app
The backend up will run on http://localhost:4000, if needed, change the address for web-app at src/Arena/actions/index.js: const ARENA_ADDR
- React
- Redux
- React-router
- [chess.js] (https://github.com/jhlywa/chess.js)
- chess-api
- express-js
- webSockets
and other.
Stepan Naumov