/hangman-api

Hangman Game RESTful API

Primary LanguageJava

Hangman - The Game

Backend of an application for the Hangman game.
RESTful API built using Java with Spring Boot.
The frontend application that consumes this API can be found in the following repository: Frontend.
If you want to know more about the Hangman game go to Wikipedia.

Prerequisites

  • Java >= 11
  • Maven >= 3
  • IDE (Preferably IntelliJ or Eclipse)

Cloning project

$ git clone https://github.com/leonardongl/hangman-api.git

How to build

  • After cloning the project, open it in the IDE of your choice
  • Build the project as a Maven application
  • Run the application
  • If you have any questions, watch this video

How to play

  • To play, you need to build the frontend of this application that is mentioned above or access the following website Hangman

Endpoints

  • Return a random word to play
{BASEURL}/words/get-word
  • Pass a {index} and a {text} as parameter and returns the word if you got it right
{BASEURL}/words/guess-word/{index}/{text}
  • Pass a {index} and a {letter} as parameter and returns the positions where that letter appears in the word
{BASEURL}/words/find-letter/{index}/{letter}

Automated and Unit Tests

  • Unit tests were implemented using JUnit 5 for each endpoint
  • You can find it in WordControllerTests

Deploy

Author

👤 Leonardo Augusto Noronha Leão