This is a Connect 4 game built using Vite, React, and TypeScript. The game allows you to play against another player or an AI opponent with two difficulty levels: "Easy" (random moves) and "Hard" (coded opponent).
- Two-Player Mode: Play against another human player.
- AI Opponent: Play against the computer with two difficulty levels:
- Easy: Random moves by the computer.
- Hard: Strategically coded opponent.
- Built with Vite React and TypeScript: A fast, modern setup for developing React applications.
- Cool Graphics
- Nice Sounds
Clone the repository:
git clone https://github.com/InternetKungen/connect4_react_ts.git
cd connect4_react_ts
Install dependencies:
Run the following command in the root directory of the project:
npm install
Running the Application Development Mode To start the development server, use:
npm run dev
This will start the Vite development server and open the application in your default browser.
Building for Production To build the app for production, run:
npm run build
The production files will be generated in the dist folder.
Previewing Production Build To preview the production build locally, run:
npm run preview
Linting To check for code quality using ESLint, run:
npm run lint
- React: A JavaScript library for building user interfaces.
- Vite: A fast build tool and development server for modern web projects.
- TypeScript: A typed superset of JavaScript.
- MUI: A popular React UI framework.
- React Three Fiber: A React renderer for Three.js for 3D graphics.
- GSAP: A powerful animation library.
- ESLint: A tool for identifying and reporting on patterns in JavaScript.
- TypeScript ESLint: Linting rules for TypeScript code.