Skip to content

Latest commit

 

History

History
102 lines (70 loc) · 2.37 KB

README.md

File metadata and controls

102 lines (70 loc) · 2.37 KB

Pongy: The Ping Pong Game Tracker

Pongy is an application to help track ping pong games, designed to be used with flic buttons. It is comprised of a server connected to a client using WebSockets. Making requests to the server will result in messages being sent to the client which will then take some action.

Getting Started

Local Development

To run both client and server locally with one command that watches for changes and reloads:

$ yarn run start:dev

You can also run the client and server separately:

$ yarn start # Start the client and watch for changes
$ yarn run start:server # Start the server (not in dev mode)

How It Works

Each side of the ping pong table is assigned a button. Pressing the button makes a request to an endpoint which then updates the application accordingly.

Button Press Actions

The flic button is capable of recognizing three actions: click, double-click, and hold.

Button Press Action
Single click Record a point
Double-click Clear the last recorded point
Hold Start a new game

Application

Server

Proposed Tech Stack

Endpoints

Method Path Action
GET /games/new Create new game
POST /games/update Update current game

Post Body

The POST endpoints expect a request body with the following format:

{
  action: '' // {string} name of store action,
  args: [], // {array} arguments to pass to action
}

Client

Proposed Tech Stack

UI Display

  • Overall score
  • Which side has service
  • Serve count

Other Information

Game Rules

  • Wall side (white) serves first
  • Two points played per service
  • Game played to 11
  • If score reaches 10 - 10, match goes into deuce
  • In deuce service alternates every point
  • Must win by 2

Future Features

  • Support tournament play (Best of 5)