This guide provides step-by-step instructions to set up and run the Uno game.
Open the main.go
file and define player names in the players
slice.
// Example:
// players := []string{"Player1", "Player2", "Player3"}
- Navigate to the
cmd/uno
directory. - Run the
main.go
file.
cd cmd/uno
go run main.go
Install wscat package
- Install Node.js
- Open Command Prompt as an administrator.
npm install -g wscat
brew install node
npm install -g wscat
sudo apt-get update
sudo apt-get install nodejs npm
To connect to the server port, use wscat
with the following command:
wscat -c ws:https://localhost:8080/ws
- Replace
8080
with your specific port number if needed. - Enter the player name correctly when prompted.
- Wait for your turn to play.
playcard <cardIndex> <NewColor>
to play and arg is valid only for WILD and DRAW_4showcards
to see cards in hand and their indextopcard
to see top card which was last played in the game deck