Skip to content

maxrussell/rpsls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Setup

Libraries to "go get"

  • github.com/lib/pq

SQL queries to run as setup

  • CREATE USER maxrussell PASSWORD 'somepassword';
  • CREATE DATABASE rpsls WITH OWNER maxrussell;
  • CREATE TABLE scoreboard( username varchar(12) PRIMARY KEY NOT NULL, score int NOT NULL );
  • GRANT SELECT, UPDATE, INSERT ON scoreboard TO maxrussell;

Running the tests

  • go test github.com/maxrussell/rpsls/...

Running The Game

The environment variable SCOREBOARD is optional and tells the game where the scoreboard is. If found, the game automatically posts results to the scoreboard. This environment variable's value should be of the form "http://localhost:8081". If not supplied, results will need to be posted to the scoreboard separately.

About

Rock Paper Scissors Lizard Spock

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages