A package for help schedule tournaments
Project description
# Tournament Scheduling
[![Build Status](https://travis-ci.org/guemues/german-game-tournament.svg?branch=master)](https://travis-ci.org/guemues/german-game-tournament) [![Coverage Status](https://coveralls.io/repos/github/guemues/german-game-tournament/badge.svg?branch=master)](https://coveralls.io/github/guemues/german-game-tournament?branch=master)
This repository created for a tournament scheduling problem.
The purpose is prevent placing same players more than one times in the same game.
You can schedule your tournament in only one way with this repo. More scheduling types including round-robin may or may not added.
The algorithm works like this for 16 person tournement:
```
[0, 1, 2 ... 15]
```
For 4 player catan tournement
First Cycle:
```
[0, 1, 2, 3]
[4, 5, 6, 7]
[8, 9, 10, 11]
[12, 13, 14, 15]
```
Second Cycle:
```
[0, 4, 8, 12]
[1, 5, 9, 13]
[2, 6, 10, 14]
[3, 7, 11, 15]
```
Support for game_per_player (game count for players) other then 2 is not tested.
With this algorithm you need k * power(player count in one game, game count for one player) player. k must be integer bigger than 0.
### Installing
```
pip install germantournament
```
### Usage
Example
```
>>>from germantournament.GameTournament import GermanGameTournament
>>>tournament = GermanGameTournament()
>>>tournament.set_player_count(16)
>>>scheduled_events = tournament.schedule(player_count_in_one_game=4)
>>>print(scheduled_events)
[[0, 4, 8, 12], [3, 7, 11, 15], [1, 5, 9, 13], [2, 6, 10, 14], [4, 5, 6, 7], [0, 1, 2, 3], [12, 13, 14, 15], [8, 9, 10, 11]]
```
[![Build Status](https://travis-ci.org/guemues/german-game-tournament.svg?branch=master)](https://travis-ci.org/guemues/german-game-tournament) [![Coverage Status](https://coveralls.io/repos/github/guemues/german-game-tournament/badge.svg?branch=master)](https://coveralls.io/github/guemues/german-game-tournament?branch=master)
This repository created for a tournament scheduling problem.
The purpose is prevent placing same players more than one times in the same game.
You can schedule your tournament in only one way with this repo. More scheduling types including round-robin may or may not added.
The algorithm works like this for 16 person tournement:
```
[0, 1, 2 ... 15]
```
For 4 player catan tournement
First Cycle:
```
[0, 1, 2, 3]
[4, 5, 6, 7]
[8, 9, 10, 11]
[12, 13, 14, 15]
```
Second Cycle:
```
[0, 4, 8, 12]
[1, 5, 9, 13]
[2, 6, 10, 14]
[3, 7, 11, 15]
```
Support for game_per_player (game count for players) other then 2 is not tested.
With this algorithm you need k * power(player count in one game, game count for one player) player. k must be integer bigger than 0.
### Installing
```
pip install germantournament
```
### Usage
Example
```
>>>from germantournament.GameTournament import GermanGameTournament
>>>tournament = GermanGameTournament()
>>>tournament.set_player_count(16)
>>>scheduled_events = tournament.schedule(player_count_in_one_game=4)
>>>print(scheduled_events)
[[0, 4, 8, 12], [3, 7, 11, 15], [1, 5, 9, 13], [2, 6, 10, 14], [4, 5, 6, 7], [0, 1, 2, 3], [12, 13, 14, 15], [8, 9, 10, 11]]
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file germantournament-0.1.1.tar.gz
.
File metadata
- Download URL: germantournament-0.1.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c99c86e9340a77fc47f5147902dc38756770d744488104ce3da904b1ab36fcce |
|
MD5 | f405aa352fc984a591f034873bc40ce3 |
|
BLAKE2b-256 | 6381eba3e47b6d536368b49d73db24dee8f8f41c53c40c9ab4584e5fec6d8dbe |