This is a demo of my favourite boardgame The Duke.
It is originally based on Java 7 with Tomcat 7 websocket (see folder "/Java-deprecated/"), and jQurey (see folder "/jQuery-deprecated/"). The latest version is based on Node.js, socket.io, and React.
You can get the full rules from here. For your convenience, a movement reference is provided here.
This game is available here to play.
- Clone the project.
- Make sure you have
npm
andnode
(Node.js) installed. - Go to the root directory of the project, and run
npm install
in command prompt to install all dependencies. - (Optional) Modify "/index.js" and "/dukechess/index.html" for port and path.
- (Optional) This project is originally designed on Windows. For Linux, please modify paths to the following files:
- Run
node index.js
at the root directory. - Visit
http://host:port/path
(the default is "http://localhost:80/") on two or more pages and enjoy!
- Source code of React is under folder "/React/src/".
- You need "/React/0_babel.bat" to preprocess JSX.
- You need "/React/1_terser.bat" to minify JavaScript for Production.
- More details can be found here.
The code is also adapted for Chess, under the folder "/chess/"). Chess is available here to play.