clong

command module
v0.0.0-...-5f81c36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

Clong

Go Report Card Build Status

A simple game where players have to throw balls at targets from their smartphones.

  1. Open /screen on any big screen. This is where the game runs. The game should begin to spawn targets.
  2. Open / on any touch device and swipe forward to launch balls at the targets. Many players can play at the same time.
  3. Open /scoreboard to get a list of high scores (which updates live).

Build and Run Locally

  1. Run make
  2. Execute the created binary and visit http://localhost:8080

Run Tests

  1. Run make test

Build Container Image

The image is also available on Docker Hub.

  1. Run make build-docker

Run on Cloud Foundry

  1. Create an SQL database service
  2. Modify deployments/cf/* to your liking
  3. Run make deploy-cf

Run on Kubernetes

  1. Create a namespace and target it.
  2. Define a USERNAME and a PASSWORD for logging in.
  3. Define a DB_USERNAME and a DB_PASSWORD for clong to access the DB with.
  4. Create a secret called clong-credentials as follows:
kubectl create secret generic clong-credentials --from-literal=clongUsername="${USERNAME}" --from-literal=clongPassword="${PASSWORD}" --from-literal=dbUsername="${DB_USERNAME}" --from-literal=dbPassword="${DB_PASSWORD}"
  1. Insert your host instead of xxx in deployments/k8s/ing-clong.yml
  2. Apply the deployment as follows:
kubectl apply -f deployments/k8s

Documentation

Overview

Command clong is a simple game that allows controller- and screen devices to connect to each other. The goal of the game is to hit targets on the screen by flicking balls at them from the controller.

Directories

Path Synopsis
internal
clong/mysql
Package mysql allows to interact with a MySQL database.
Package mysql allows to interact with a MySQL database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL