Skip to content

Axelweaver/type-script-tetris-2023

Repository files navigation

type-script-tetris-2023

An example of a simple Tetris game in the TypeScript programming language

image

https://axelweaver.github.io/type-script-tetris-2023/

Tetris is a puzzle video game created in 1985 by Alexey Pajitnov, a Soviet software engineer. It has been published by several companies for multiple platforms, most prominently during a dispute over the appropriation of the rights in the late 1980s. After a significant period of publication by Nintendo, the rights reverted to Pajitnov in 1996, who co-founded the Tetris Company with Henk Rogers to manage licensing.

In Tetris, players complete lines by moving differently shaped pieces (tetrominoes), which descend onto the playing field. The completed lines disappear and grant the player points, and the player can proceed to fill the vacated spaces. The game ends when the uncleared lines reach the top of the playing field. The longer the player can delay this outcome, the higher their score will be. In multiplayer games, players must last longer than their opponents; in certain versions, players can inflict penalties on opponents by completing a significant number of lines. Some versions add variations on the rules, such as three-dimensional displays or a system for reserving pieces. read more..

🌍 Environment

Software Version(s)
Node.JS v20.3.1
npm/Yarn yarn v3.6.1
TypeScript v5.1.6
Vite v4.4.6
IDE VSCode v1.80.1
Operating System Windows 11

Project build

The assembly and debugging of the project is carried out on Node.JS version 20.3.1 you can install it from this link https://nodejs.org/en

image

the Yarn package manager version 3.6.1 is also used.

To install yarn run the command:

npm install --global yarn

To install Yarn version 3.6.1, go to the project directory and run the command:

yarn set version 3.6.1

After that, you can call the command to install all dependencies:

yarn install

To build the project, you need to run the command:

yarn build

image

To start debugging an application in real time, you need to run the following command:

yarn dev

Display the following in the console:

image

Press the O key to open the application in the browser. To exit debug mode - Q

If you want to run an ESLint check and fix the simplest remarks right away, run this command:

yarn lint

you can also run the TypeScript compiler without assembly to check types in your code:

yarn check-types

Development environment

To work on this project, I used the VSСode IDE, it can be downloaded for free from the page: https://code.visualstudio.com/

image

About

An example of a simple Tetris game in the TypeScript programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published