diff --git a/Makefile b/Makefile index a235a7d..c0adae5 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index cbbad0f..5acbbea 100644 --- a/README.md +++ b/README.md @@ -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: