poker

Game description
poker is a planning poker game (or scrum poker) limiting vote influence between the players. The goals are to collect an independent vote from each player and to improve the vote experience of distributed teams.
- Vote progress is shared without showing vote values to avoid influence between players.
- Vote values are revealed only when the vote session is closed, and the vote distribution is displayed.
- Players can join or leave at any time.

Client console
Each player starts a console client to join the team server and play the game.
Client main features:
- display available commands
- allow mouse and keyboard user inputs
- user defined or generated player name
- commands: quit game, start new vote, send vote, modify vote, close the vote session
- display vote progress during vote session
- display distribution of votes when vote session is closed
- content is driven by the server to maintain consistency between players
Server
The server broadcasts a shared vision to all clients in real time.
Server main features:
- start single game to host client players
- share vote and available commands to all users
- add newly connected user
- remove disconnected user
- broadcast vote status per user during vote session
- broadcast votes when all votes are available or vote is manually closed
- reset vote values when a new vote starts
- close vote when all players have voted
Usage
Binary or docker image version can be used to start the server or a client.
Binary
The same binary file is used to start the server and console clients. Various platform are supported. See latest release page for more details.
Start a single server instance (dedicated for one team):
$ ./poker server
subcommand 'server'
websocket: localhost:8080
- or specifying the websocket to open:
$ ./poker server -websocket 127.0.0.1:7878
subcommand 'server'
websocket: 127.0.0.1:7878
When the server is started, start a client for each player. It must be able to communicate with the server.
- example of client specifying a player name and the websocket value:
$ ./poker client -name Player1 -websocket 127.0.0.1:7878
subcommand 'client'
name: Player1
server websocket: 127.0.0.1:7878
- example of client using a generated name and default websocket:
./poker client
subcommand 'client'
name: snowy-cloud
server websocket: localhost:8080
Each player can navigate the client console and send commands using keyboard and mouse.
NB: in mobaXterm mouse events are not always correctly handled
Docker image
By default the docker image runs a server listening on 0.0.0.0:8080.
Using the docker command line it is possible to expose that port outside of the conatainer and to modify the IP and port of the server.
Server:
docker run -p 8080:8080 ghcr.io/fc92/poker:main
subcommand 'server'
websocket: 0.0.0.0:8080`
Client with IP 192.168.0.10:
It is also possible to start a client instance.
docker run -it ghcr.io/fc92/poker:main /poker client -name PlayerName -websocket 192.168.0.10:8080
This section provides technical information for developers.
High level design
HTTP websocket is used for "real-time" communication between clients and the server. Messages are in JSON format and contain Room and Participant information.
A server instance maintains a single Room that contains:
- a
Participant for each player,
- the status of the game: vote open or closed.
The Room content changes when a client sends a command or is disconnected. Each change is broadcasted to all clients.
Each Participant contains information about a player:
- player name,
- commands available to the user,
- vote value.
A Participant can be updated by local user actions or updates sent from the server.
Low level design
Server and console client are written in pure Go language.
The software is packaged as a single binary file for each supported platform. The same file is used with different parameters to start a server or a client instance from a text console.
It should be possible to write other client implementations using other languages supporting websocket and JSON. The focus of this project is pure GO so far.
Debug log
Server debug logs can be activated using the -debug flag
Ideas for the future
$ tinygo build -wasm-abi=generic -target=wasi -o poker.wasm cmd/poker.go
# golang.org/x/sys/unix
../.go/pkg/mod/golang.org/x/sys@v0.0.0-20220722155257-8c9f86f7a55f/unix/syscall_unix.go:526:17: Exec not declared by package syscall