This repository was created to explore the functionality of the ts-pattern library . It consists of the following directories:
- classes: Contains the
Game
class responsible for the "Rock, Paper, Scissors" game engine. - enums: Contains enums storing values responsible for moves available in the game (
MoveEnum
) and the game result (ResultEnum
). - types: Stores TypeScript types necessary for correctly typing the game process, such as
PlayerType
,ResultType
,DrawType
,WinnerType
. - tests: Contains a set of tests to verify the correctness of the game logic.
The runtime environment used is Deno (v1.39.4). To run the tests, use the command deno test
.
- Clone this repository to your local machine (Deno 1.39.4 is needed).
- Navigate to the root directory of the repository.
- Run
deno test
command to execute the tests and verify the functionality of the "Rock, Paper, Scissors" game.