Download the PHP package tilttek/tavern-games without Composer

On this page you can find all versions of the php package tilttek/tavern-games. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tavern-games

tilttek/tavern-games

Classic dice and card games for a tavern table online, turn by turn: fair dice and shuffles, each player sent only their own cards, ties shown as ties.

tilttek/tavern-games plays traditional tavern games, free of rights, at tables of tilttek/game-engine, with rules written for this library. Pig and Ship, Captain and Crew are dice games; their dice are rolled by tilttek/dice with the chance of the table, so that replaying a table rolls the same dice. Crazy Eights is a card game; its cards are kept by tilttek/card-deck, shuffled from a seed drawn from the table's own, and each player sees their own hand, the top of the discard pile and how many cards the others hold — never their cards nor the order of the draw pile.

A tavern game keeps its own turns: a die that shows 1 or a card played ends a turn by the game's rules. The timeout of a turn goes through an optional port: an application that gives a turn timer is told whose turn starts and calls back when the delay runs out, and the game ends that turn the way its rules say, never with a penalty beyond the turn. Without a timer, a turn lasts until it is played. An estimator counts the odds of a position over simulated endings, with wins, ties and losses apart and the number of endings they were counted on, so that a shared win is shown as itself. The end of a game is told in one of three tones: a victory, a shared victory — both celebrated — or a good game, told kindly and never mocked.

It is for an application that hosts games played at a distance — a game night, a site's tavern — and wants every table auditable and fair. It is a plain PHP library whose dependencies are tilttek/game-engine, tilttek/dice and tilttek/card-deck. A game of a publisher is published only with the publisher's consent on record; the library holds none.

Status

Part State
Contract\TavernGame, Turns: turn-based games that keep their own turns and accept the timeout of a turn Implemented and tested
TavernTables, Contract\TurnTimer, Store\NullTurnTimer, Store\InMemoryTurnTimer: tables opened and played, the turn timer told, late timeouts ignored Implemented and tested
Ending, Tone: a victory, alone or shared, celebrated; any other ending told kindly Implemented and tested
DiceCup: six-sided dice rolled by tilttek/dice with the chance of a move Implemented and tested
Odds\Estimator, Odds\Estimate, Odds\Trial, Contract\Simulation: odds over simulated endings, ties apart Implemented and tested
Game\Pig, Game\ShipCaptainCrew, Odds\CargoChase: two dice games, and the odds of a turn of the second Implemented and tested
Game\CrazyEights: a card game on tilttek/card-deck Implemented and tested
TavernGames: the games of an application, by name Implemented and tested
Exceptions under one TavernGamesException interface Implemented and tested
Real-time games, a Symfony bundle, its controllers and Stimulus controllers Not started

Documentation

Document What it covers
Installation Requirements, installing and wiring.
Tables and turns TavernTables, the game's own turns, the turn timer and timeouts, endings.
Writing a tavern game The TavernGame contract, turns, dice, cards and the rules of the library's games.
The dice games Pig and Ship, Captain and Crew: their moves, options, views and outcomes.
Crazy Eights The card game, its cards on tilttek/card-deck, what each seat sees, and its endings.
Odds The estimator, wins, ties and losses apart, and the chase of a cargo.
Extension points What an application gives the library.
Exceptions TavernGamesException and its exceptions, with their messages.
Testing The library's tests, fuzz target and benchmarks, and testing a tavern game.
Reference Every public type, with its role.

Quick start

Requirements

PHP 8.5 or later, ext-sodium, tilttek/game-engine 0.1, tilttek/dice 0.3 and tilttek/card-deck 0.1.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Tilttek project. See LICENSE.


All versions of tavern-games with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-sodium Version *
tilttek/card-deck Version ^0.1@dev
tilttek/dice Version ^0.3@dev
tilttek/game-engine Version ^0.1@dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tilttek/tavern-games contains the following files

Loading the files please wait ...