Skip to content

nikku/skaat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 17, 2023
7713011 · Dec 17, 2023

History

63 Commits
Dec 16, 2023
Dec 17, 2023
Dec 17, 2023
Jan 31, 2021
Dec 16, 2023
Dec 16, 2023
Dec 17, 2023
Dec 17, 2023
Dec 17, 2023
Dec 17, 2023
Dec 16, 2023
Dec 16, 2023

Repository files navigation

skaat

CI

A Skat game loop.

Can be embedded to build a fully featured Skat application.

Installation

npm install skaat

Usage

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 and asks you for input as needed. You can provide input via human players or bots.

Related