Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aykutkardas/ymir-js
This toolkit is created to make it easier for you to develop games like chess, checkers, go, match 3 puzzle and more. It is still under development.
https://github.com/aykutkardas/ymir-js
checkers chess game game-development go match3 toolkit
Last synced: 18 days ago
JSON representation
This toolkit is created to make it easier for you to develop games like chess, checkers, go, match 3 puzzle and more. It is still under development.
- Host: GitHub
- URL: https://github.com/aykutkardas/ymir-js
- Owner: aykutkardas
- Created: 2020-05-18T00:23:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-27T21:26:19.000Z (about 1 year ago)
- Last Synced: 2024-09-14T20:58:09.801Z (2 months ago)
- Topics: checkers, chess, game, game-development, go, match3, toolkit
- Language: TypeScript
- Homepage:
- Size: 578 KB
- Stars: 35
- Watchers: 5
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ymir-js
This toolkit is created to make it easier for you to develop games like chess, checkers, go, match 3 puzzle and more. It is still under development.
### Create Board
```js
const board = new Board({ x: 3, y: 3 });
```### Set Item
```js
const item = new Item({ name: 'myFirstItem' });
board.setItem('0|0', item);
```### Get Item
```js
board.getItem('0|0');
// => { name: 'myFirstItem', ... }
```### Move Item
```js
board.moveItem('0|0', '1|1');
```### Remove Item
```js
board.removeItem('1|1');
```### Switch Item
```js
const firstItem = new Item({ name: 'myFirstItem' });
const secondItem = new Item({ name: 'mySecondItem' });board.setItem('0|0', firstItem);
board.setItem('1|1', secondItem);board.switchItem('0|0', '1|1');
board.getItem('0|0');
// => { name: 'mySecondItem', ... }board.getItem('1|1');
// => { name: 'myFirstItem', ... }
```### Empty Control
```js
board.isEmpty('2|2');
// => true
```### Exist Control
```js
const board = new Board({ x: 3, y: 3 });board.isExistCoord('5|5');
// => false
```### Get Matrix
```js
board.getBoardMatrix();/* =>
[
[{ item }, { item }, { item }],
[{ item }, { item }, { item }],
[{ item }, { item }, { item }]
]
*/
```---
## Roadmap
| Name | Status | Link |
| ---------------------- | ------ | --------------------------------------------------------------- |
| Turkish Checkers | WIP | [Source](https://github.com/aykutkardas/turkish-checkers) |
| International Checkers | WIP | [Source](https://github.com/aykutkardas/international-checkers) |
| Chess | - | - |
| Match 3 Puzzle | - | - |
| Go | - | - |---