# skaat

> A Skat game loop

Latest version **0.3.1** (published 2023-12-17) · 0 weekly downloads

## Install

```sh
npm install skaat
pnpm add skaat
yarn add skaat
bun add skaat
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2023-12-17 |
| First published | 2021-01-31 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 16 |
| Dependencies | 0 |
| Unpacked size | 214.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Nico Rehwaldt |
| Maintainers | nikku |
| Keywords | skat, game loop |

## Links

- npm: https://www.npmjs.com/package/skaat
- Repository: https://github.com/nikku/skaat
- Homepage: https://github.com/nikku/skaat#readme
- Issues: https://github.com/nikku/skaat/issues
- npm.io page: https://npm.io/package/skaat

## Recent versions

- 0.3.1 (latest) — 2023-12-17
- 0.3.0 — 2023-12-17
- 0.2.0 — 2023-12-17
- 0.1.1 — 2023-12-16
- 0.1.0 — 2023-12-16
- 0.0.5 — 2021-02-04
- 0.0.4 — 2021-02-03
- 0.0.3 — 2021-02-02
- 0.0.2 — 2021-01-31
- 0.0.1 — 2021-01-31

## README

# skaat

[![CI](https://github.com/nikku/skaat/actions/workflows/CI.yml/badge.svg)](https://github.com/nikku/skaat/actions/workflows/CI.yml)

A [Skat](https://en.wikipedia.org/wiki/Skat_%28card_game%29) game loop.

Can be embedded to build a [fully featured Skat application](https://nikku.github.io/skaat-app/).


## Installation

```
npm install skaat
```


## Usage

```javascript
import { Game, Clubs } from 'skaat';

const game = new Game();

game.next('start'); // [ 'ask-bid', 2 ]
game.next('pass', 2); // [ 'ask-bid', 0 ]
game.next('bid', 0, 24); // [ 'ask-ack', 1 ]
game.next('pass', 1); // [ 'ask-declare', 0 ]
game.next('declare', 0, { suit: Clubs }); // [ 'ask-card', 1 ]

...
```

The game loop enforces the rules of [Skat](https://en.wikipedia.org/wiki/Skat_%28card_game%29) and asks you for input as needed. You can provide input via human players [or bots](./test/AutomaSpec.js).


## Related

* [skaat-app](https://github.com/nikku/skaat-app)

---
_Source: https://npm.io/package/skaat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
