- Make sure you have node.js (recommended: node v10 LTS) with npm and git installed.
- Open the command line (cmd on windows, terminal on mac)
- Check out this repo on the command line with
git clone https://github.com/Trias/schafkopf
- Enter the directory with
cd schafkopf
- run
npm install
on the command line - After npm installed the dependencies, run
npm run build
on the command line
Now you are ready to go. You can choose from the following starting points:
node build/index.js
: runs the default profile. Simulates 4 computer players and prints the outputnode build/index.js --profile=manual
: runs the manual profile. You can play against the computernode build/index.js --profile=manual --manual=2
: runs the manual profile but you play at the second position.node build/index.js --profile=manual --manual=2 --log=private
: like above but now you can see the cards of the other players and the reasoningnode build/index.js --profile=manual --manual=2 --log=private --seed=seed
: like above but now card deals are predeterminednode build/index.js --profile=manual --manual=2 --log=private --seed=seed --saveFile=games.json
: like above but now saves the games so you can later replay themnode build/index.js --profile=manual --manual=2 --log=private --seed=seed --saveFile=games.json --runs=100
: like above but with a hundred gamesnode build/index.js --profile=replay --manual=2 --replay=1 --log=private --saveFile=games.json
: replay the saved game (seed is ignored because it is determined by the save game)
see more (advanced) options with node build/index.js -h