This is a bare-bones implementation of the board game Codenames (Copyright © 2021 Czech Games Edition).
The implementation just provides enough functionality to play the game when the cards are not available. It is up to the players to establish a channel for communication and to observe the rules.
At least Clojure and Java have to be installed. The software was built with Clojure 1.10.3 and Java 15.0.2.
The commands
clojure -M:cljs:fig:min
clojure -X:uberjar
produce the uberjar target/kodnevek.jar
The generated jar file can be executed by
java -jar kodnevek.jar
If the environment variable JDBC_DATABASE_URL
is set, it should point to
PostgreSQL database where the games are stored. If this variable is not set, the
games are not persisted and get lost when the program terminates.
After startup, the application is available at the port specified by the PORT
environment variable or at 8080 if PORT
is not set. For example,
http://localhost:8080/ if no port has been set.
clojure -X:test:test-run
These tests require Google Chrome to be installed. (The current
setup assumes it is installed at /opt/google/chrome/chrome
, test.cljs.edn
has to be adjusted if it is installed somewhere else.)
The tests can be executed by running
clojure -M:cljs:fig:test:test-cljs-run
The test coverage can be checked by running
clojure -M:test:cloverage
clj -A:dev:test
clj -A:dev:test:cljs:fig:build
I have the following in my .dir-locals.el
file
((nil
(cider-clojure-cli-global-options . "-A:dev:test:cljs:fig")
(cider-default-cljs-repl . figwheel-main)
(cider-figwheel-main-default-options . "dev")
))
and start both a Clojure and a ClojureScript REPL.