This project is a modern implementation of the classic Tetris game using React. It was created on July 21, 2024, with the assistance of Claude 3.5 Sonnet, an AI language model developed by Anthropic.
This Tetris game is built using React and features:
- Classic Tetris gameplay
- Score tracking
- Game over detection
- Piece rotation and movement
- Responsive design with Tailwind CSS
Before you begin, ensure you have met the following requirements:
- Node.js (v14.0.0 or later)
- npm (v6.0.0 or later)
To install the Tetris game, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/tetris-react.git
- Navigate to the project directory:
cd tetris-react
- Install the dependencies:
npm install
To run the Tetris game locally:
- Start the development server:
npm start
- Open your browser and visit
http://localhost:3000
- Left Arrow: Move piece left
- Right Arrow: Move piece right
- Down Arrow: Move piece down
- Up Arrow: Rotate piece
tetris-react/
│
├── public/
│ ├── index.html
│ └── favicon.ico
│
├── src/
│ ├── App.js
│ ├── index.js
│ └── index.css
│
├── package.json
├── tailwind.config.js
└── README.md
This project uses the following main dependencies:
- React
- Create React App
- Tailwind CSS
For a full list of dependencies, please refer to the package.json
file.
This app can be easily deployed on platforms like Vercel or Netlify. Follow these general steps:
- Create an account on Vercel or Netlify
- Connect your GitHub repository to your Vercel/Netlify account
- Configure the build settings:
- Build command:
npm run build
- Output directory:
build
- Build command:
- Deploy the app
Contributions to this Tetris project are welcome. Please ensure to update tests as appropriate.
This project is open source and available under the MIT License.
- This project was bootstrapped with Create React App.
- Game logic inspired by various Tetris implementations available online.
- Special thanks to Claude 3.5 Sonnet (Anthropic, 2024) for assistance in development and documentation.
Created with the assistance of Claude 3.5 Sonnet (Anthropic, July 2024)