Skip to content

Aleksandyr/game-rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock Paper Scissors Game

Rock-Paper-Scissors is a game played to settle disputes between two people.

The game is played with three possible hand signals that represent a rock, paper, and scissors. The rock is a closed fist, paper is a flat hand with fingers and thumb extended and the palm facing downward, and scissors is a fist with the index and middle fingers fully extended toward the opposing player.

Rock wins against scissors, paper wins against rock, and scissors wins against paper. If both players throw the same hand signal, it is considered a tie, and play resumes until there is a clear winner.

NOTE: If you wan to see full commit history please do refer rock-paper-scissors.

Tech stack

React | Typescript | Redux-Toolkit | Redux-saga | Nodejs | Express | Sqlite | Sequelize

How to run

  1. run yarn install on root directory
  2. run yarn start

How to run tests

  1. go to {rootFolder}/packages/client
  2. run yarn test

Authentication

Initially there are five seeded users:

1. username: User-1 | password: Pass-1
2. username: User-2 | password: Pass-2
3. username: User-3 | password: Pass-3
4. username: User-4 | password: Pass-4
5. username: User-5 | password: Pass-5

NOTE: You can choose playing with them or create your own account.

Tests

  • Battle Field:
    • Ui
      • Check if the component is rendered
      • Should select {rock, paper, scissors} when user click's {rock, paper, scissors}
    • Redux store
      • User should win when faced user:rock to computer:scissors
      • User should lose when faced user:paper to computer:scissors
      • Computer should choose paper when store sends paper
    • Integration
      • Check result if server sends that you lost.
  • Auth Form:
    • Redux-saga
      • Login update token with action call
      • Login update call with mocked API call

Tests TODO

  • Test all server endpoints
  • Test all redux-saga generator funcs
  • Test all state responses
  • Test all React components
  • Integration - test all user/computer interactions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published