# Roulette Bet

`RouletteBet` is a Solidity smart contract designed for the blockchain-based game of Roulette. It manages individual bets placed by players, tracking various details such as the bet amount, the specific condition or numbers bet on (represented as a bitmap), and the outcome of the bet. This contract is integral to the game's operation, providing functions to set and retrieve bet information, ensuring secure and verified gameplay.

`RouletteBet` inherits from `Ownable` and implements the `BetInterface`, providing a structured approach to managing a roulette bet's lifecycle and data. It encapsulates bet details, including the player's address, the associated game, amounts, and outcomes, with access control enforced through the `Ownable` contract.

## Usage Scenario

In a typical usage scenario, a `Roulette` game contract will instantiate a `RouletteBet` for each bet made by a player. The game contract, acting as the owner of the bet contract, will then update the bet details based on game outcomes, such as determining whether the player wins or loses and updating the bet status and result accordingly.

## Functions

* **Getters:** Functions to retrieve bet information, such as `getPlayer()`, `getGame()`, `getAmount()`, `getStatus()`, `getCreated()`, `getResult()`, `getBetInfo()`, `getRequestId()`, `getWinNumber()`, `getBetsCount()`, and `getBet(index)`.
* **Setters:** Functions to set bet details, restricted to the contract owner (e.g., `setPlayer()`, `setGame()`, `setAmount()`, `setStatus()`, `setRequestId()`, `setResult()`, `setWinNumber()`, `setBets()`).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.celestium.digital/smartcontracts-description/roulette/roulette-bet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
