Skip to content

krosn/Checkers-Frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Checkers: The Game πŸ‘‘ Frontend docs

Made with React

Components

Main

This component encompesses the entire app, laying out the route. This route is very simple, containing only '/' and '/game'.

Home

This component is the mainmenu / homepage. This is what the user sees before starting a game.

Game

This component implements the game of checkers itself. Here some noteable functons:

  • receiveMove() - This is a callback function fired by the Socket framework. It will be called whenever a move has been made (by either opponent).

  • userJoined() - This is a also callback function fired by the Socket framework. It will be called whenever a user joins the game (including the client).

Socket

This component implements the client-side Socket.io framework. Here some noteable functons:

  • subscribeToGame() - This function takes in the callback functions receiveMove() and userJoined() and fires them as indicated above.

  • sendMove() - This function emits a message to the Socket component, this contains a string with move data.

TODOs πŸ› 

About

CS451

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •