ZackHu-2001 / Tetris-AI

Tetris implemented with React, supports AI competition mode (trained with DQN)
https://tetris.zackhu.com/
1 stars 0 forks source link
nextjs react reinforcement-learning tetris-game zustand

Tetris AI Challenge

This is a Tetris game build with React, with AI competition mode integrated.

Open tetris.zackhu.com to play!

AI Competition Mode

AI competition mode

Feature:

Some Screenshots

Main Menu

Main Menu

Sprint Mode

Sprint Mode

Setting Page

Setting Page

Folder structure:

src
| - app
|    | - firebase           - configuration file for firebase backend
|    | - globals.css        - global css configuration file
|    | - layout.tsx         - UI that shared between routes
|    | - page.tsx           - root page, with route '/'
|
| - components
     | - MenuButton         - Unify menu button style
     | - Modal
        | - BasicModal      - The basic modal component (all the followinng components would be rendered on top of it)
        | - Control         - The control page that would be displayed on the modal when user click control on the main menu
        | - MainMenu        - The main menu page ...
        | - Pause           - The pause page ...
        | - Setting         - The setting page ...
     | - Panels             - Controls the behavior of all those panels
     | - PlayField          - The area where the main gameplay occurs
     | - Timer              - 'functional' component as its name suggests 
     | - GameBoard          - Store global game states

To run this project

Install dependency

npm install

Run on local server

npm run dev

Build pacakge

npm run build