https://github.com/cyrus07424/roulettesimulator
Roulette strategy simulator
https://github.com/cyrus07424/roulettesimulator
casino gambling roulette simulator
Last synced: 7 months ago
JSON representation
Roulette strategy simulator
- Host: GitHub
- URL: https://github.com/cyrus07424/roulettesimulator
- Owner: cyrus07424
- License: mit
- Created: 2018-09-28T14:17:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T15:51:05.000Z (over 1 year ago)
- Last Synced: 2024-04-24T12:36:23.201Z (over 1 year ago)
- Topics: casino, gambling, roulette, simulator
- Language: Java
- Size: 170 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
ROULETTE SIMULATOR
Spin Success with rouletteSimulator: Your Key to Strategic Roulette Simulation!
![]()
![]()
![]()
![]()
## Table of Contents
- [ Overview](#-overview)
- [ Features](#-features)
- [ Project Structure](#-project-structure)
- [ Project Index](#-project-index)
- [ Getting Started](#-getting-started)
- [ Prerequisites](#-prerequisites)
- [ Installation](#-installation)
- [ Usage](#-usage)
- [ Testing](#-testing)
- [ Project Roadmap](#-project-roadmap)
- [ Contributing](#-contributing)
- [ License](#-license)
- [ Acknowledgments](#-acknowledgments)---
## Overview
The rouletteSimulator project is a sophisticated open-source tool that simulates roulette game strategies. It allows users to customize game parameters, select strategies, and view key statistics in a user-friendly interface. Ideal for gambling enthusiasts, researchers, and developers looking to analyze and optimize roulette betting strategies.
---
## Features
| | Feature | Summary |
| :--- | :---: | :--- |
| โ๏ธ | **Architecture** |
- Java-based architecture
- Utilizes JavaFX for UI components
- Follows a modular design pattern
| ๐ฉ | **Code Quality** |
- Consistent coding style
- Well-structured classes and methods
- Proper error handling
| ๐ | **Documentation** |
- Extensive documentation in Java and FXML files
- Clear explanations of UI layouts and model classes
- Missing information on package managers and containers
| ๐ | **Integrations** |
- Integration with GitHub Actions for CI/CD
- Dependency management with Maven and Dependabot
- Uses Java and FXML for UI components
| ๐งฉ | **Modularity** |
- Separation of concerns with distinct UI and model components
- Encapsulation of prediction and betting logic
- Potential for further modularization based on codebase structure
| ๐งช | **Testing** |
- Testing details not provided
- Assumed presence of unit tests for critical components
- Opportunity for enhancing testing coverage and strategies
| โก๏ธ | **Performance** |
- No specific performance details mentioned
- Performance likely dependent on algorithm efficiency
- Potential for optimization based on simulation complexity
| ๐ก๏ธ | **Security** |
- Security aspects not highlighted
- Considerations for data validation and secure coding practices
- Opportunity for security audits and enhancements
| ๐ฆ | **Dependencies** |
- Dependencies include Java, JavaFX, and related FXML files
- Utilizes GitHub Actions, Maven, and Dependabot for automation
- Dependency details not fully specified
---
## Project Structure
```sh
โโโ rouletteSimulator/
โโโ .github
โ โโโ dependabot.yml
โ โโโ workflows
โโโ LICENSE
โโโ README.md
โโโ pom.xml
โโโ src
โโโ main
```
### Project Index
ROULETTESIMULATOR/
__root__
src
main
resources
fxml
InitialSetting.fxml
Defines the initial settings interface layout for the application, including menu options and user input fields for configuring the roulette game parameters.
SimulationMode.fxml
- Defines the layout for the Simulation Mode interface, showcasing strategy options and key statistics
- The file structures the UI elements using JavaFX components, facilitating user interaction with the simulation.
SelectStrategyList.fxml
- Defines the user interface layout for selecting strategies in the JavaFX application
- Displays a list of strategies in a ListView component and provides an 'OK' button for confirmation
- The SelectStrategyList.fxml file contributes to the visual representation and user interaction of the application's strategy selection feature.
cell
SimulationModeStrategyCell.fxml
Displays a structured layout for visualizing simulation mode strategy details, including key financial metrics and performance indicators.
SelectStrategyListStrategyCell.fxml
Defines the layout for displaying a strategy selection cell in the JavaFX application.
java
model
SpotPrediction.java
Defines a SpotPrediction class in the model package to represent a predicted outcome with its associated probability.
Bet.java
Defines a Bet class with properties for bet type and value, facilitating the representation of bets within the project's domain model.
BetTypePrediction.java
Define and encapsulate bet type predictions with associated probabilities in the project's model package.
ColorPrediction.java
- Defines color prediction probabilities for red, black, and green outcomes
- This class encapsulates the likelihood of each color occurring based on a specific input
- It plays a crucial role in predicting color outcomes within the project's architecture.
constants
Configurations.java
Define environment settings and configurations for the project, including random number generation method, spot history size, balance history size, initial balance, minimum and maximum bet amounts, setting file directory, and strategy list file name.
enums
BetType.java
- Defines various types of bets in a roulette game and provides methods to retrieve a list of valid bet types based on the game type, as well as the corresponding odds for each bet type
- The code file plays a crucial role in managing and organizing the different betting options available in the roulette game within the codebase architecture.
Spot.java
- Defines various characteristics and behaviors of roulette spots, such as color, number range, and column placement
- Enables retrieval of spots based on specific criteria and generation of random spots according to configurable rules
- Facilitates categorization and selection of spots for roulette simulations.
SpotGenerateType.java
- Define various methods for generating spots in the project, such as random selection, sequential numbers, and specific color choices
- The SpotGenerateType enum encapsulates different strategies for generating spots on the board, contributing to the project's versatility and gameplay dynamics.
RouletteType.java
Defines different types of roulette for the project's architecture.
predictor
MarkovPredictor.java
- MarkovPredictor class utilizes Markov tables to predict the next spot and bet type based on historical data
- It updates probabilities for spot and bet transitions, aiding in making informed predictions for roulette outcomes
- The class contributes to enhancing the predictive capabilities of the overall system.
CountPredictor2.java
- Generates spot and bet type predictions based on historical data
- Calculates probabilities for each spot and bet type, considering their occurrence frequency
- Additionally, computes color predictions by analyzing the frequency of red, black, and green spots
- The code contributes to predicting outcomes in a roulette game based on past results.
DifferencePredictor.java
- Generates spot predictions based on historical data, calculating the average difference to predict future spots in a roulette game
- The code file contributes to the project's architecture by providing a method to generate a list of spot predictions using a difference prediction approach.
BasePredictor.java
- Defines a base class for predictors in the project, providing methods to retrieve predictions for the next spot, bet type, and color based on the given context
- The class structure allows for easy extension and customization of prediction logic throughout the codebase architecture.
MarkovPredictor2.java
- Generates spot and bet type predictions based on the Markov table using the recent spot history
- Calculates probabilities for the next spot and bet type occurrences, aiding in predicting outcomes for the roulette game.
RandomPredictor.java
Generates random predictions for spots and bet types based on the current roulette context.
RnnPredictor.java
- Generates spot predictions based on historical data using a recurrent neural network (RNN)
- The code initializes the RNN network, trains it with historical data, and predicts the next spot based on the input sequence
- The RNN model iterates through the historical data to make accurate spot predictions for future outcomes.
CountPredictor.java
- Generates predictions based on occurrence counts of spots and bet types in a roulette game
- Updates counts and probabilities for each prediction type.
application
RouletteContext.java
- The RouletteContext class encapsulates the state of a roulette game, tracking key parameters like balance and bet limits
- It also maintains a history of outcomes and calculates the percentage of red, black, and green spots in the history
- This class plays a crucial role in managing the game's context within the codebase architecture.
Main.java
- Initiates the application by displaying the initial settings screen through the BaseController
- The Main class in the provided file serves as the entry point for the application, launching the program and handling any exceptions that may occur during startup.
controller
InitialSettingController.java
- Manages initial settings for a roulette simulator app, allowing users to configure game parameters like balance, bet amounts, and game mode
- Provides options to view app information, select strategies, and start simulations
- Creates a context for the selected roulette type and user-defined settings.
SimulationModeController.java
- Manages simulation mode functionality by updating strategies, calculating outcomes, and displaying results
- Initializes a scheduled service for continuous processing, updating strategy parameters, and refreshing the UI
- Displays current loop count and color occurrence rates
- Logs information and adds outcomes to the context.
SelectStrategyListController.java
- Manages strategy selection for a roulette game by initializing strategy options, allowing users to enable/disable them, and saving selections
- Enables users to choose strategies and closes the selection window upon confirmation.
BaseController.java
- Facilitates opening different screens in the application by providing methods to display initial settings, select strategies, and enter simulation mode
- Handles setting up stages, loading FXML layouts, and initializing controllers for each screen
- Supports seamless navigation and interaction within the application.
utils
LogHelper.java
- LogHelper class formats and outputs log messages to the console with timestamps and caller information
- It provides methods for logging at different levels (INFO, DEBUG, ERROR) and includes details like class and method names
- This utility enhances the project's logging capabilities, improving debugging and monitoring across the codebase.
StrategyHelper.java
- Facilitates management of strategy classes within the application, including creating, saving, and retrieving strategy class lists
- Enables dynamic loading and instantiation of strategy classes based on configuration settings.
FileHelper.java
- Create a FileHelper class to manage setting files
- The class provides a method to retrieve a setting file based on the given file name
- If the parent directory of the file does not exist, it creates the necessary directories.
PredictorHelper.java
Manages instances of predictors by storing them in a map for easy retrieval.
BetHelper.java
- The `BetHelper.java` file in the `utils` package provides essential functions for calculating the total bet value and total payout within the project
- It encapsulates logic to determine the total value of bets placed and the total payout based on specific criteria
- This utility class plays a crucial role in managing and processing betting-related data, contributing to the overall functionality of the codebase architecture.
cell
SimulationModeStrategyCell.java
- Displays simulation mode strategy details in a cell format for the roulette game interface, including strategy name, balance, bet values, and winning statistics
- Updates cell visuals based on live status.
SelectStrategyListStrategyCell.java
- Enables customization of strategy selection cells in the strategy selection screen by binding a callback to the checkbox displayed for each strategy
- This allows for dynamic updating of the checkbox state based on the selected strategy.
strategy
MartingaleStrategy2.java
- Implements a Martingale strategy based on higher probability between red and black in roulette
- Determines next bet based on previous outcome: minimum bet if won, double last bet if lost.
TwoInOneStrategy.java
- Implements a betting strategy based on the 2in1 method for red bets in roulette
- Adjusts bet amounts based on previous outcomes to optimize potential wins.
TenUnitStrategy.java
- Implements a betting strategy based on the 10-unit method for red bets only
- Adjusts bet amounts dynamically based on previous outcomes to optimize balance utilization
- Automatically resets the betting sequence when reaching the limit.
MultiBetStrategy.java
- Implements a multi-bet strategy using a predictor to determine bet amounts based on probabilities
- Determines bet amounts based on balance and prediction probabilities, ensuring bets are within set limits.
ThirtyOneSystemStrategy.java
- Implements a betting strategy based on the 31 System for red bets in roulette
- Resets after two consecutive wins or a loss on the 8th attempt
- Adjusts bet amounts based on the set count
- The strategy aims to optimize red bet outcomes in the game.
MonteCarloStrategy.java
- Implements a Monte Carlo strategy for betting on the first dozen in a roulette game
- Adjusts bet amounts based on previous outcomes to optimize winning potential.
Rate_99_46_PercentStrategy.java
- Implements a betting strategy based on historical outcomes, targeting specific patterns to place bets on the second and third dozens
- The strategy aims to optimize betting decisions by leveraging past data to increase the chances of winning.
StraightUpStrategy.java
- Implements a strategy for single-point bets using a predictor
- Determines the most probable outcome based on predictions and places a bet accordingly
- The strategy leverages a specific predictor to make informed betting decisions, enhancing the overall betting approach within the project architecture.
RandomStrategy2.java
- Generates a list of bets based on a random strategy, considering the previous winning bet
- The strategy creates a list of bets by copying the previous winning bet and adding random bets until reaching a specified size
- The file contributes to the project's architecture by providing a flexible and dynamic betting strategy for the roulette game.
MartingaleStrategy3.java
- Implements Martingale betting strategy using a predictor
- Determines next bet based on color prediction and previous outcomes
- Adjusts bet amount based on win history
- Designed to work within the broader roulette betting application architecture.
GrandMartingaleStrategy.java
- Implements Grand Martingale strategy for red bets in a roulette game
- Determines next bet based on previous outcomes: places minimum bet if last bet won, otherwise doubles last bet amount plus minimum bet
- Enhances gameplay strategy by dynamically adjusting betting amounts.
EastCoastProgressionStrategy.java
- Implements East Coast Progression Strategy for red bets in the roulette game
- Adjusts bet amount based on previous outcomes to optimize balance.
ReverseMartingaleRedStrategy.java
- Implements a reverse Martingale strategy for betting exclusively on red in a roulette game
- Determines the next bet amount based on previous outcomes, aiming to maximize winnings
- Inherits from a base strategy class and utilizes a specific bet type
- Designed to enhance the project's betting strategies within the overall architecture.
NeighborStrategy.java
- Implements a Neighbor Betting Strategy using a predictor for European-style roulette
- Calculates probabilities for different areas based on predictions and places bets on spots with the highest probability.
DalembertStrategy.java
- Implements a betting strategy based on the Dalembert method for red bets in roulette
- Adjusts bet size based on previous outcomes to manage risk and potential gains.
FlowerBetStrategy.java
- Implements Flower Bet Strategy using a predictor to determine high-probability outcomes
- Selects bet types based on predictions for the next spin.
MartingaleStrategy4.java
- Implements Martingale betting strategy for 1st and 2nd dozens in a roulette game
- Determines bet amounts based on previous outcomes, aiming to recover losses and make a profit
- The strategy is encapsulated within the MartingaleStrategy4 class, providing a structured approach to betting decisions within the project's architecture.
Rate_98_48_PercentStrategy.java
- Implements a betting strategy based on historical outcomes, aiming to increase bets on specific conditions
- Utilizes past spot history to determine bet amounts and types for future rounds.
CocomoStrategy.java
- Implements a betting strategy based on the Cocomo method for the first dozen in roulette
- Determines the next bet amount based on previous outcomes, aiming to optimize winnings
- The strategy is encapsulated within the CocomoStrategy class, providing a structured approach to betting decisions in the application.
MartingaleStrategy5.java
- Implements a Martingale betting strategy for specific bet types in a roulette game
- Determines bet amounts based on previous outcomes to optimize potential wins.
BaseStrategy.java
- Defines a base class for strategies in the project, managing key metrics like balance, bets, and wins
- It calculates and updates betting information, tracks performance metrics, and provides methods for sorting strategies based on balance and name.
TripleSixStrategy.java
- Implements a betting strategy based on the '666ๆณ' system, this code file defines the TripleSixStrategy class
- It calculates and returns a list of bets for various bet types in a roulette game, each with specific bet amounts based on the provided context
- The strategy aims to optimize betting choices following the '666ๆณ' approach.
StraightUpStrategy2.java
- Implements a strategy for multiple straight bets using a predictor
- Determines bet amounts based on predictions and current balance
- Selects bet types and values based on spot predictions' probabilities.
RandomStrategy.java
- Generates random betting strategies based on available bet types and multipliers
- Utilizes a random number generator to create a list of bets with varying amounts
- The strategy is designed to be unpredictable and diverse in its betting choices within the given context.
MansuriansStrategy.java
- Implements a strategy based on the Mansurians method for the roulette game
- Extends the BaseStrategy class and provides a method to retrieve the strategy name
- The code file defines the logic for generating the next bet list within the roulette context.
GoodmanStrategy.java
- Implements Goodman's Red-Only strategy for roulette
- Determines bet amounts based on previous outcomes, escalating after losses
- Resets after a win
- Designed to optimize betting strategy for red outcomes.
MartingaleStrategy.java
- Implements Martingale betting strategy for red bets in a roulette game
- Determines next bet based on previous outcomes: minimum bet if last bet won, double last bet if lost
- Enhances gameplay dynamics by adjusting betting strategy dynamically.
StraightUpStrategy3.java
- Implements a strategy for multiple straight bets based on recent outcomes
- Determines bets on spots not recently appearing, adjusting based on consecutive wins
- Returns a list of bets for each available spot.
TenPercentStrategy.java
- Implements a betting strategy based on the 10% rule for red bets in roulette
- Determines the bet amount as 10% of the current balance, ensuring a minimum bet of 1 unit
- The strategy aims to optimize betting decisions for red outcomes, enhancing the overall gameplay experience.
BarnetStrategy.java
- Implements a betting strategy based on the Barnet method for red bets only
- Adjusts bet amounts based on a set pattern, resetting after losses
- Provides a structured approach to managing bets in the roulette game.
SevenKaimeStrategy.java
- Implements a strategy based on the "7th time law" for betting on red in roulette
- Determines if the last 7 spins resulted in black, then places a red bet if true
- This class extends the BaseStrategy and is part of the strategy package in the project structure.
.github
dependabot.yml
- Automates daily dependency updates for Maven and GitHub Actions, limiting open pull requests to 10
- Scheduled to run at midnight in Asia/Tokyo timezone
- This configuration file ensures timely updates and maintains a streamlined development process by managing dependencies efficiently.
workflows
maven.yml
- Automates Java project builds using Maven with JDK 8 setup, caching, and GitHub Actions
- Implements CI/CD workflows for building and testing Java projects on GitHub, ensuring code quality and automating label addition for pull requests by dependabot.
---
## Getting Started
### Prerequisites
Before getting started with rouletteSimulator, ensure your runtime environment meets the following requirements:
- **Programming Language:** Java
### Installation
Install rouletteSimulator using one of the following methods:
**Build from source:**
1. Clone the rouletteSimulator repository:
```sh
โฏ git clone https://github.com/cyrus07424/rouletteSimulator
```
2. Navigate to the project directory:
```sh
โฏ cd rouletteSimulator
```
3. Install the project dependencies:
echo 'INSERT-INSTALL-COMMAND-HERE'
### Usage
Run rouletteSimulator using the following command:
echo 'INSERT-RUN-COMMAND-HERE'
### Testing
Run the test suite using the following command:
echo 'INSERT-TEST-COMMAND-HERE'
---
## Project Roadmap
- [X] **`Task 1`**: Implement feature one.
- [ ] **`Task 2`**: Implement feature two.
- [ ] **`Task 3`**: Implement feature three.
---
## Contributing
- **๐ฌ [Join the Discussions](https://github.com/cyrus07424/rouletteSimulator/discussions)**: Share your insights, provide feedback, or ask questions.
- **๐ [Report Issues](https://github.com/cyrus07424/rouletteSimulator/issues)**: Submit bugs found or log feature requests for the `rouletteSimulator` project.
- **๐ก [Submit Pull Requests](https://github.com/cyrus07424/rouletteSimulator/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.
Contributing Guidelines
1. **Fork the Repository**: Start by forking the project repository to your github account.
2. **Clone Locally**: Clone the forked repository to your local machine using a git client.
```sh
git clone https://github.com/cyrus07424/rouletteSimulator
```
3. **Create a New Branch**: Always work on a new branch, giving it a descriptive name.
```sh
git checkout -b new-feature-x
```
4. **Make Your Changes**: Develop and test your changes locally.
5. **Commit Your Changes**: Commit with a clear message describing your updates.
```sh
git commit -m 'Implemented new feature x.'
```
6. **Push to github**: Push the changes to your forked repository.
```sh
git push origin new-feature-x
```
7. **Submit a Pull Request**: Create a PR against the original project repository. Clearly describe the changes and their motivations.
8. **Review**: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph
---
## License
This project is protected under the [MIT License](https://choosealicense.com/licenses/mit/) License. For more details, refer to the [LICENSE](https://github.com/cyrus07424/fileUtils/blob/master/LICENSE) file.
---
## Acknowledgments
- List any resources, contributors, inspiration, etc. here.
---