Multiplayer Tetris - using React, NodeJs and websockets.
Tetris is a puzzle game (see Wikipedia), whose subject is to contain falling pieces aslong as possible in a Playground. The game is over when the field no longer offers enoughroom for a new piece to fall. When one or more lines of land are complete, they disappear, allowing to postpone the expiry of the game.
The game relies on a client / server architecture. The client runtime environment is a browser. The server is written with NodeJS.Clients and server communicate via http. The communication between the server and the clients is bi-directional, we used socket.io for its implementation.
$ sudo service postgresql stop
IMPORTANT : then use sudo to execute the commands below
$ npm run start
$ npm run log
Access Tertris on : http://localhost:3005/tetris
Watch all containers
$ docker ps -a
Clean all about docker containers
$ docker stop $(docker ps -a -q)
$ docker system prune
First, you have to run the tests separately
$ npm run server:coverage
$ npm run client:coverage
Then, install globaly istanbul-coverage :
$ npm install -g istanbul-combine
and execute in the root folder :
$ istanbul-combine -d coverage -p detail -r lcov client/coverage/coverage-final.json server/coverage/coverage-final.json
or
$ npm run coverage:all