update README, makefile

This commit is contained in:
stryan 2021-07-23 12:10:49 -04:00
parent 277189f229
commit 7c593faa51
2 changed files with 15 additions and 7 deletions

View File

@ -1,14 +1,13 @@
GAMEFILES=$(wildcard internal/game/*.go)
COORDFILEs=$(wildcard internal/coordinator/*.go)
PROG=snengame
#set variables
GIT_COMMIT := $(shell git rev-list -1 HEAD)
ifeq ($(PREFIX),) # PREFIX is environment variable, but if it is not set, then set default value
PREFIX := /usr/local
endif
$(PROG): $(GOFILES)
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)"
all: client server engine
client: $(GAMEFILES) $(wildcard cmd/client/*.go)
go build -ldflags "-X main.GitCommit=$(GIT_COMMIT)" ./cmd/client
server: $(GAMEFILES) $(wildcard cmd/server/*.go)

View File

@ -2,21 +2,30 @@
A quick and dirty prototype of a game server for snengame.
Contains local debug isntance (engine), server (server), and a client (client).
Written in-between concussion dizzy spells; some decisions made to minimize having to think hard about them.
Other decisions made to ease the Soon(tm) networkification of this code.
Other decisions made to deal with Websockets, which I'm learning as I go, and having multiple games running.
## What's implemented
* Most cards (Jokers are Valkyires)
* Playing, moving, attacking cards
* A hacky loop to test out game commands
* Janky client and server
## What's not implemented
* Actually winning or losing
* Ready checking
* Second player draws an extra card
* Multiple matches in server
* picking who goes first
## How to build
Run "make all" to generate all three binaries (engine,client,server).
Otherwise, run "make [binary name]" to geneerate a specific one.
## How to test
Run the snengame binary to use the built in game loop.
Run the engine binary to use the built in game loop.
Commands are entered like so: