Giter Club home page Giter Club logo

gambling.api's Introduction

Try it out

This app is hosted on Azure: https://gambling-api.azurewebsites.net/

Gambling API

Welcome to the Gambling API! Built with ASP.NET Core, this application allows players to bet on a randomly generated number between 0-9. With a starting balance of 10,000 points, players have the opportunity to increase their points by placing bets and predicting the right number.

Features

A player starts with an initial account of 10,000 points. The player can place a bet on a randomly generated number between 0-9. If the player's prediction is correct, they win 9 times their stake.

API Endpoints

Endpoint: "/"

Method: POST

Request payload example: { "points": 100, "number": 3 }

Response payload after a win: { "account": 10900, "status": "won", "points": "+900" }

Response payload after a loss: { "account": 9900, "status": "lost", "points": "-100" }

How to reset points balance:

Clear cookies to make server forget your debts

Setting Up & Running locally

  • Clone the repository.
  • Navigate to the project directory.
  • Use the command dotnet restore to restore the required packages.
  • Run the API using the dotnet run command.
  • Access the API on http://localhost:5173 (default configuration).

gambling.api's People

Contributors

bogdanyarotsky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.