Git Product home page Git Product logo

gotak's Introduction

gotak

Build Status GoDoc Go Report Card

A Tak server.

Summary

The rough goal of this repo is to create a server that lets two people play tak together no matter their client. It needs to do the following things:

  • Parse PTN format
  • Provide a shared set of state between two players for a game
  • Store game history
  • Provide some sort of scoring?

Inspirations

TODO

  • Game Storage

    • Game state storage
      • Board
      • Pieces
      • Players
    • Game state history
      • Current state
      • Moves made
  • Game Play

    • Game move input
    • Game move validation
      • Game completion checking
    • Game notation parsing
  • Tests using real game notations

  • JSON API

    • GET /game/$id
      • Returns a game of ID $id with the most recent state.
    • GET /game/$id/$move
      • Returns a game of ID $id after move $move.
    • POST /game/$id/move
      • Client sends a move for game of $id. Request must include a valid player ID and a valid move.
    • POST /game/new
      • Creates a new game and returns a game ID. Must provide player IDs.

Future

  • Scoring
  • Authentication
  • Player ranking
  • Sharing of game histories between friends
  • A gallery of well played games
  • A simple AI to play against if no one else is around

gotak's People

Contributors

dependabot[bot] avatar icco avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gotak's Issues

+

gotak/README.md

Lines 19 to 24 in 53646b8

## TODO
- Game Storage
- Game state storage
- Board
- Pieces


This issue was generated by todo based on a TODO comment in 53646b8. It's been assigned to @icco because they committed the code.

Get Turns and Meta

gotak/web/database.go

Lines 36 to 41 in 24a56c3

worker := sanic.NewWorker7()
id := worker.NextID()
slug := worker.IDString(id)
query := `INSERT INTO games (slug) VALUES ($1)`
_, err := db.Exec(query, slug)


This issue was generated by todo based on a TODO comment in 24a56c3. It's been assigned to @icco because they committed the code.

Get span id?

gotak/server/logging.go

Lines 44 to 49 in f4769c2

// TODO: Get span id?
// https://github.com/census-instrumentation/opencensus-go/blob/master/trace/trace.go#L98
entry.Logger = entry.Logger.WithField("req", logFields)
entry.Logger.Infoln("request started")


This issue was generated by todo based on a TODO comment in f4769c2. It's been assigned to @icco because they committed the code.

Support branches. Right now we discard things that are not ints.

gotak/game.go

Lines 122 to 127 in 2d300cb

// TODO: Support branches. Right now we discard things that are not ints.
numberVal := fields[0]
numberVal = strings.TrimRight(numberVal, ".")
if regexp.MustCompile("[^0-9]+").MatchString(numberVal) {
log.Printf("%+v is not a number, ignoring line.", numberVal)
return nil, nil


This issue was generated by todo based on a TODO comment in 2d300cb. It's been assigned to @icco because they committed the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.