Completed Microservices: PokerGameCheckerMicroservice
- Introduction
- Features
- Getting Started
- API Endpoints
- Swagger Documentation
- Documentation
- Testing
- Contributing
- License
The Poker Game Checker Microservice is an API that allows users to determine the winner of a Poker game. It calculates the winner based on Poker hand rankings, taking into account the number of players and their card hands.
- Calculate the winner of a Poker game.
- API documentation with Swagger.
- Error handling for various scenarios.
- Easily extensible for future enhancements.
To get started with this microservice, follow these steps:
-
Clone the repository:
git clone https://github.com/sudeepcb/CardGamesCheckerAPI.git cd CardGamesCheckerAPI/PokerGameCheckerMicroservice -
Build and Run:
- Open the project in your favorite development environment.
- Build and run the solution.
- The API will be available at
http://localhost:PORT/pokergame(replacePORTwith the appropriate port).
-
API Usage:
- Use your preferred API testing tool (e.g., Postman) to send requests to the API.
- Refer to the API Endpoints section for details on the available endpoints.
-
Testing:
- Write and run unit tests to ensure the application behaves as expected.
- Calculate Winner of Poker Game
- Endpoint:
POST /pokergame - Request Body: JSON containing Poker game data (e.g., number of players and their card hands).
- Response: JSON with the winning player's details.
- Endpoint:
Swagger is integrated into the project for API documentation. To explore the API, follow these steps:
- Start the microservice.
- Open a web browser and navigate to
http://localhost:PORT/swagger/index.html(replacePORTwith the appropriate port). - Swagger provides a user-friendly interface to interact with the API, view endpoints, and understand the input and output data models.
Documentation is located in the documents folder in the REPO.
Documentation
For now testing has been done for main functionally but more tests related to during the process of creating models, as well as testing different test cases should be performed in the future.
Tests:
PokerGameChecker_CalculateWinner_ReturnsIActionResult()
CardConstants_CheckIfCardRankingIsCorrectForGame_ReturnsRankWithGivenCards()To run the tests, use your development environment's testing framework.
Contributions are welcome! If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a feature branch.
- Make your changes.
- Write unit tests if necessary.
- Submit a pull request.
This project is licensed under the MIT License. Feel free to use, modify, and distribute it according to the terms of the license.