Go-Spy-Go is an implementation of the Spyfall party game, built by Josiah and Carson in React and Go.
This is mostly a learning-focused project, so the codebase is a mess. It will get better over time... hopefully
To develop in this project with Go, you must set your $GOPATH
enviorment variable to the /server
directory in the root of this project. The project can be run by running go run main.go
from the /server/src/spyfall
directory or running go run spyfall
from the /server
directory.
These are just for development. Some reference material for how web socket messages are to be sent and what responce(s) should be expected
{
"kind":"CREATE_GAME",
"data": "{\"game-id\":\"\",\"username\":\"USERNAME\"}"
}
(Notice it's the exact same thing as the message from the client)
{
"kind":"CREATE_GAME",
"data": "{\"game-id\":\"\",\"username\":\"USERNAME\"}"
}
(Notice it's the exact same thing as the message from the client, just with the generated game-id (if applicable) and the error)
{
"kind":"CREATE_GAME",
"data":"{\"game-id\":\"GAMEID\",\"username\":\"USERNAME\"}",
"error":"{\"error\":\"ERRORCODE\",\"description\":\"ERRORDESC\"}"
}
{
"trigger":"create-game",
"data":"{\"code\":\"GAMECODE\", \"username\":\"USERNAME\"}"
}
{
"response" : "OK",
"data" : "GAMECODE"
}
{
"response" : "ERROR",
"data" : "ERROR_MESSAGE"
}
{
"trigger" : "join-game",
"data" : "{\"code\":\"GAMECODE\", \"username\":\"USERNAME\"}"
}
{
"response" : "OK",
"data" : "GAMECODE"
}
{
"response" : "ERROR",
"data" : "ERROR_MESSAGE"
}