/scribble-noughts-and-crosses

A game of Noughts and Crosses written in TypeScript communicating following a Scribble protocol

Primary LanguageTypeScriptMIT LicenseMIT

Noughts and Crosses with Scribble arXiv

A game of Noughts and Crosses written in TypeScript implementing a communication protocol written in Scribble.

Generating Interactive WebSocket Applications in TypeScript (PLACES 2020)

Anson Miu, Francisco Ferreira, Nobuko Yoshida, Fangyi Zhou

Getting started

Prerequisites:

  • Node.js
    • brew install node or equivalent
  • TypeScript
    • npm i -g typescript

Install packages:

# Server
cd server/
npm install

cd ../

# Client
cd client/
npm install

Usage

Open a separate terminal for the Game Client and Game Server.

  1. Run the server:
cd server/
npm run-script build
npm start
  1. Run the client:
cd client/
npm start
  1. Access localhost:3000 on 2 separate browser windows
  2. Play!

Session Types

Scribble protocol of game logic available as NoughtsAndCrosses.scr.

Implementation

Refer to server/README.md and client/README.md for details on the generated code and user implementation.

Update (25/02/2020): WIP code generation repository found under TypeScript-Multiparty-Sessions.