GithubHelp home page GithubHelp logo

mediacomem / comem-archioweb-tictactoe Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 2.0 2.04 MB

An exercise to implement a real-time tic-tac-toe with WebSockets or the Web Application Messaging Protocol (WAMP).

Home Page: https://comem-archioweb-tictactoe.herokuapp.com/

Dockerfile 1.08% JavaScript 83.66% HTML 7.71% Shell 0.25% SCSS 7.31%
ws websocket wamp-protocol wamp real-time exercise

comem-archioweb-tictactoe's Introduction

Web-Oriented Architecture Tic-Tac-Toe Exercise

This is an exercise for the COMEM+ Web-Oriented Architecture Course.

The exercise assumes you are familiar with the following subjects of the course:

Exercise

Requirements

The goal

The purpose of this exercise is to implement real-time communication in a small web game, either with WebSockets or the Web Application Messaging Protocol (WAMP).

This repository contains a partially implemented tic-tac-toe web application:

  • The app/backend directory contains an Express.js application that can register players and manage multiple games.
  • The app/frontend directory contains a jQuery application that can display a list of available tic-tac-toe games, as well as the game interface.
  • The app/class directory contains domain classes used by both previous components.

The game logic is fully implemented, but there is no communication between backend and frontend. The code has been structured so that there are only 2 files that need to be modified to make the application functional:

  • The app/backend/dispatcher.js file handles the backend's communications with the frontend clients.
  • The app/frontend/dispatcher.js file handles the frontend client's communications with the backend.

Use one of the two suggested technologies to make the game functional.

Getting started

Clone this repository:

$> git clone https://github.com/MediaComem/comem-archioweb-tictactoe

Move into the repository and install dependencies:

$> cd comem-archioweb-tictactoe
$> npm ci

Run the following command to launch both the backend and frontend in development mode (code will re-compile automatically when you change files, although you will still have to refresh your browser window):

$> npm run start:watch

Visit http://localhost:3000 to view the application. Of course, the game will not be functional since it is missing any kind of communication between backend and frontend.

If port 3000 is already taken, you may change it with the $PORT environment variable when running the command: PORT=4000 npm run start:watch.

Implement real-time communications

Follow one of these guides:

Resources

Contributing

See CONTRIBUTING.md.

comem-archioweb-tictactoe's People

Contributors

alphahydrae avatar dependabot[bot] avatar verdonarthur avatar

Watchers

 avatar  avatar  avatar  avatar

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.