@pompidup/kingdomino-engine 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +66 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # Kingdomino Engine
2
+
3
+ ## Overview
4
+
5
+ Kingdomino Engine is a simple and lightweight TypeScript engine designed to facilitate the gameplay of Kingdomino. It provides the core logic for managing game states, rules, and player interactions, making it easy to integrate into any application that requires a Kingdomino game engine.
6
+
7
+ ## Features
8
+
9
+ - **Game State Management**: Efficiently manage game states, including player turns, game rules, and game progression.
10
+ - **Rule Enforcement**: Automatically enforce game rules, ensuring a fair and consistent gameplay experience.
11
+ - **Player Interaction**: Simplify player interactions, including drawing tiles, placing dominoes, and scoring.
12
+ - **Customizable Rules**: Support for custom game rules, allowing for a wide range of gameplay variations.
13
+
14
+ ## Installation
15
+
16
+ To install the Kingdomino Engine, you can use npm or yarn. Run the following command in your terminal:
17
+ bash npm install @pompidup/kingdomino-engine
18
+
19
+ or
20
+
21
+ bash yarn add @pompidup/kingdomino-engine
22
+
23
+ ## Usage
24
+
25
+ ### Basic Setup
26
+
27
+ To start using the Kingdomino Engine, you need to import it and initialize a new game instance.
28
+
29
+ typescript import { KingdominoEngine } from '@pompidup/kingdomino-engine';
30
+
31
+ const engine = new KingdominoEngine();
32
+
33
+ ### Setting Up Rules
34
+
35
+ You can customize the game rules by passing an array of rule names to the `setRules` method.
36
+
37
+ typescript engine.setRules(['rule1', 'rule2']);
38
+
39
+ ### Starting a Game
40
+
41
+ To start a new game, use the `startGame` method.
42
+
43
+ typescript engine.startGame();
44
+
45
+ ### Player Actions
46
+
47
+ Players can perform actions like drawing tiles, placing dominoes, and passing turns.
48
+
49
+ typescript // Example: Drawing a tile engine.drawTile('player1');
50
+
51
+ // Example: Placing a domino engine.placeDomino('player1', { x: 0, y: 0 }, 'domino1');
52
+
53
+ // Example: Passing a turn engine.passTurn('player1');
54
+
55
+ ## Contributing
56
+
57
+ Contributions are welcome! Please read the [contributing guide](CONTRIBUTING.md) for details on how to contribute to this project.
58
+
59
+ ## License
60
+
61
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
62
+
63
+ ## Acknowledgments
64
+
65
+ - Thanks to all the contributors who have helped shape this project.
66
+ - Special thanks to the Kingdomino community for their support and feedback.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pompidup/kingdomino-engine",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A simple engine for the game Kingdomino",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -16,7 +16,8 @@
16
16
  "lint": "tsc",
17
17
  "test": "vitest",
18
18
  "coverage": "vitest --coverage --config ./vitest.config.ts",
19
- "build": "tsup"
19
+ "build": "tsup",
20
+ "pub": "pnpm build && npm login && npm publish --access public"
20
21
  },
21
22
  "keywords": [
22
23
  "kingdomino",