Casino games built with Java 8 on top of the Spring Framework.
-
Games are built using a bespoke Game Framework.
- It allows a set of games (of a particular type) to be hosted within a micro-service.
- It expects to be running alongside micro-services representing other domains (which are just stubs at the moment).
- The Game Framework is tested using a contrived game that I call Snooze (because the player doesn't do anything... "you snooze, you win!").
-
There's also a work in progress implementation of Roulette, which:
- Allows a Customer to enter a room hosting a game (making them a Spectator).
- At this point, they can watch the Croupier play out game after game.
- Allows a Spectator to join a game (making them a Player).
- Allows a Player to place a Bet (only Single Bets are supported at the moment).
- Chips are deducted according to the Stake (via the Bank)
- The Croupier only takes Bets from Players with enough Chips
- The Croupier pays out Bets that win (again, via the Bank).
- Allows a Player to leave the game (making them a Spectator again).
- Allows a Spectator to exit the room (where they lose their Spectator status).
- Allows a Customer to enter a room hosting a game (making them a Spectator).
Refer to Branches.md in the notes
directory for information on the various branches, and how commits flow between them.
I'm using v3.3.9.
Name | Description | Dependencies |
---|---|---|
!parent | Parent POM | Spring Boot (1.4.0.RELEASE) |
game-srvkit | Toolkit for creating a game service | !parent |
game-roulette-service | An implementation of Roulette using game-srvkit | !parent; game-srvkit |
Make the !parent
directory the current directory (this is where my bash prompt spends most of its time!) and then compile, test and package the modules using the ubiquitous:
$ mvn clean install
From the !parent
directory, execute the following command to start an instance of the micro-service:
$ java -jar ../game-roulette-service/target/game-roulette-service-0.0.1-SNAPSHOT.jar
Note: The current release doesn't do very much because the "game loops" aren't being "pumped" automatically yet (see Issue #10).
For now, look at com.sparcs.casino.roulette.VisitToTheCasinoTest
in the src/test/java
directory of game-roulette-service to get a feel for how the API works, or browse the JavaDocs (see API Documentation below).
To change the server port, or the number of Roulette Rooms created when the Application starts, edit src/main/resources/application.yaml
of game-roulette-service:
server:
port: 10000
---
roulette:
gameCount: 10
The roulette.* properties are managed by com.sparcs.casino.RouletteConfigurationProperties
.
Extensive log messages are written. Change the logging level in logback.xml
in src/main/resources
or test-logback.xml
in src/test/resources
. Current value is TRACE
, which is quite spammy.
<logger name="com.sparcs.casino" level="TRACE" .../>
In adition to the UML class diagrams (Other Domains, Game Framework, and Roulette), you can generate JavaDocs by following this procedure:
-
Make
!parent
the current directory -
Execute:
mvn clean javadoc:aggregate
- This will write a JavaDoc site to the directory ```../apidocs-<release>```
- Where ```<release>``` is ```${parent.version}``` from ```!parent/pom.xml```
- i.e., for the latest release on the master branch the directory is ```../apidocs-0.0.1-RELEASE```.
- Note that the maven goal doesn't delete the directory first
casino's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.