This guide provides step-by-step instructions to set up and run the Uno game.
Install Task
brew install go-taskOpen the main.go file and define player names in the players slice.
// Example:
// players := []string{"Player1", "Player2", "Player3"}task build:servertask run:serverInstall wscat package
- Install Node.js
- Open Command Prompt as an administrator.
npm install -g wscat
brew install nodenpm install -g wscat
sudo apt-get updatesudo apt-get install nodejs npm
To connect to the server port, use wscat with the following command:
wscat -c ws://localhost:8080/wsTo create Game Room lobby , use the following command:
wscat -c "ws://localhost:8080/create?player_name=[NAME]&max_players=[MAX_PLAYER_COUNT]"
wscat -c "ws://localhost:8080/create?player_name=Alice&max_players=2"To JOIN Game Room lobby , use the following command:
wscat -c "ws://localhost:8080/join?player_name=[NAME]&mroom_id=[ROOM_ID_NUMBER]"
wscat -c "ws://localhost:8080/join?player_name=Bob&room_id=33"- Replace
8080with 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_4showcardsto see cards in hand and their indextopcardto see top card which was last played in the game deck
