Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MayGo/rock-paper-scissors

Open more actions menu

Repository files navigation

Game

Running on: https://rock-paper-scissors-d43zz6zsz-trimatech-projects.vercel.app/

Rock Paper Scissors Game Screenshot

TODO

  • Set up React + TypeScript + Vite project
  • Add Chakra UI
  • Implement game core mechanics:
    • Player balance system (starting 5000)
    • Betting mechanism (500 increments, max 2 positions)
    • Win/loss calculation:
      • Single position win (14x return)
      • Two positions win (3x return)
      • Tie handling (return bet amount)
  • Create UI components:
    • Betting position buttons (Rock/Paper/Scissors)
    • Blance / Bet amount / Win counter display
    • Computer choice display VS best of player choice
    • Game result screen with Winner and win amount
  • Implement game flow:
    • Bet placement phase
    • Computer choice randomization
    • Result comparison logic
    • Balance update system
    • Prevent invalid game states
  • Add animation for computer choice
  • Add animation for balance update
  • [z] Fix layout shift if values changes in header
  • Add animation for win
  • Add unit tests
  • Make it playable on mobile
  • Check for rerenders
  • Add Cypress tests
  • Add sound effects
  • Add background music
  • Make it possible to add different value chips (premature refactoring?)

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
    languageOptions: {
        // other options...
        parserOptions: {
            project: ['./tsconfig.node.json', './tsconfig.app.json'],
            tsconfigRootDir: import.meta.dirname
        }
    }
});
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from 'eslint-plugin-react';

export default tseslint.config({
    // Set the react version
    settings: { react: { version: '18.3' } },
    plugins: {
        // Add the react plugin
        react
    },
    rules: {
        // other rules...
        // Enable its recommended rules
        ...react.configs.recommended.rules,
        ...react.configs['jsx-runtime'].rules
    }
});

About

Game written in React

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.