tic-tac-toe

command module
v0.0.0-...-6f83e94 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

README

TicTacToe

Go Doc License

TicTacToe is a small microservice that acts as the backend for a tic tac toe game by using the Firebase realtime database.

Contents

Requirements

  • Go v1.15.x installed
  • golangci-lint installed on your local machine
    • used for linting and detecting common errors

Getting started

  1. Download the Go dependencies

    $ go mod download
    
  2. Clone (i.e make a copy) .env.example to .env and modify it as needed

  3. Build and execute the microservice

    $ make buildrun
    

API Documentation

The microservice exposes a Swagger UI interface on http://${HOST}:${PORT}/swagger/index.html.

Implementation Status

  • Allow only one move per player, i.e. one after the other
  • Detect if a ‘POST /move’ call was made by a player or the Firebase function
  • Serve correct status codes and descriptive response bodies for invalid input
  • Sanity check input and game state
  • Bonus points for detecting if a game will result in a draw / deadlock early on
    • Detection does not happen early on.
  • Provide unit tests

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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