A modern implementation of the extended Rock Paper Scissors game, built with React and TypeScript.
This web application features:
- React with TypeScript
- Zustand for state management
- Smooth transitions and animations enhancing user interaction
- Responsive design optimized for mobile, tablet, and desktop
- Modern component architecture with modular CSS
| Desktop | Tablet | Mobile |
|---|---|---|
![]() |
![]() |
![]() |
This game expands on the traditional Rock Paper Scissors with two additional moves:
- Rock crushes Scissors and crushes Lizard
- Paper covers Rock and disproves Spock
- Scissors cuts Paper and decapitates Lizard
- Lizard poisons Spock and eats Paper
- Spock smashes Scissors and vaporizes Rock
- Clone the repository
- Install dependencies:
npm install - Run the development server:
npm run dev - Build for production:
npm run build
├── public/
│ └── assets/
│ └── images/ # Game icons and images
├── src/
│ ├── components/
│ │ ├── Board.tsx # Game board with options
│ │ ├── BoardSelected.tsx # Game result display
│ │ ├── GameHeader.tsx # Score header
│ │ └── Rules.tsx # Rules modal
│ ├── pages/
│ │ └── Home.tsx # Main game page
│ ├── store/
│ │ └── useGameStore.tsx # Zustand store
│ ├── styles/
│ │ └── 2-components/ # Component-specific styles
│ │ └── _rules.css # Rules component styling
│ ├── App.tsx # Main app component
│ ├── main.css # Global styles
│ └── main.tsx # Entry point
├── index.html
├── package.json
├── tsconfig.json
└── vite.config.ts
The project uses a structured CSS approach with:
- Component-specific stylesheets in dedicated folders
- Fixed positioning for consistent UI elements
- Media queries for responsive design
- Clean class naming conventions
- Choose one of the five options: Rock, Paper, Scissors, Lizard, or Spock
- The computer will randomly select its choice
- Winner is determined based on the game rules
- Score is updated: +1 for winning, -1 for losing
- Click "Play Again" to start a new round


