Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulocheque/python-cardgameengine
https://github.com/paulocheque/python-cardgameengine
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulocheque/python-cardgameengine
- Owner: paulocheque
- Created: 2012-04-08T14:44:23.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-03-15T07:15:35.000Z (almost 9 years ago)
- Last Synced: 2024-12-02T07:55:56.939Z (25 days ago)
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkd
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/paulocheque/django-dynamic-fixture.png?branch=master)](https://travis-ci.org/paulocheque/django-dynamic-fixture)
[![Docs Status](https://readthedocs.org/projects/django-dynamic-fixture/badge/?version=latest)](http://django-dynamic-fixture.readthedocs.org/en/latest/index.html)
[![Coverage Status](https://coveralls.io/repos/paulocheque/django-dynamic-fixture/badge.png?branch=master)](https://coveralls.io/r/paulocheque/django-dynamic-fixture?branch=master)
[![Code Status](https://landscape.io/github/paulocheque/django-dynamic-fixture/master/landscape.png)](https://landscape.io/github/paulocheque/django-dynamic-fixture/)[![Hack Score](https://hackscore.herokuapp.com/badge/56576b58bec5a70003917054?template=2)](https://hackscore.herokuapp.com/profile/56576b58bec5a70003917054)[![Hack Score](https://hackscore.herokuapp.com/badge/56576b58bec5a70003917054?template=3)](https://hackscore.herokuapp.com/profile/56576b58bec5a70003917054)# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6text: *italic*, **bold**, _emphasis_, normal, http://link.com
# Unordered list
- item 1
- item 2# Ordered list
1. item 1
2. item 2# Code
```
print('test')
```# Image
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
= Game Engine =
[![Hack Score](https://hackscore.herokuapp.com/badge/56576b58bec5a70003917054?template=1)](https://hackscore.herokuapp.com/profile/56576b58bec5a70003917054)
== Threads ==
AssyncrhonousCommandManager runs in a different thread.
- Start: When the game starts
- Stop: When the game endEach command:
- Start: When a commands manager execute a command
- Stop: When the command is executed or if its algorithm get a timeout (Configurations - timeForCommand)Each strategy:
- Start: When a player plays
- Stop: When a player finish your turn or if its strategy get a timeout (Configurations - timeForPlay)Each Game:
- Start: When a game starts
- Stop: When a game has been finished or if its algorithm get a timeout (Configurations - timeForGame)1) Main thread:
- Start commands manager in thread A (If commands manager is assynchronous)
- Start game in thread B2) Thread B:
- Start player execution in thread C3) Thread C:
- Create commands used in thread A (assynchronous) or thread B (synchronous)4) Thread A or B:
- Start execution of a command in thread D== Commands ==
GameCommand: Manages data
OK: Success
Unknown: Command not registered in game
Invalid: Command that break the rules
Cheat: Invalid command with bad intention
Error: Command buggedCommands Manager (SyncrhonousCommandManager or AssyncrhonousCommandManager): It manages the model through commands
SyncrhonousCommandManager: Run each command at a time, synchrounously.
AssyncrhonousCommandManager: Enqueue commands assynchronously and execute one at a time.
== Players ==
Context: What data of a game one player can see to play properly.
All contexts has: player (yourself), currentGamePlayers and configurationsPlayer: One player has: name, strategy, team, context
Team: One team has: name, list of players (players)
Strategy: Player and context
RuntimeStrategy: Strategy that reads a sourcecode== Game ==
GameReport: players, initialNumberOfPlayers, configurations, winners, losers, banneds, commands, playersDurationTime, durationTime
Configurations: timeForPlay, timeForGame
AbstractRound: Basic structure of a game: players, report, winners, isTheEnd, start, playerPlays
Game: The game: Observable, commands manager, configurationsGameOfRoundsReport: GameReport with round reports
GameRound: AbstractGame, contains the most of games logic
GameOfRounds: Game with a list of rounds, it manages the rounds== Factory ==
GameFactory: Factory for a game
FactoryManager: Manage a list of avaiable games
= Card Game Engine =
CardPlayerContext: shortcut to playercards
CardGameCommand: shortcut to playercards
RoundReport: algorithmsErrors TODO
CardGameReport: wrapper
Round: distributeCardsToAllPlayers, seeCards, currentPlayer, playercards
CardConfigurations: deckPrototype
CardGame: GameOfRounds
CardGameFactory: wrapper