LalitKM / tame-of-thrones

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem Statement:

1. Golden Crown: There is no ruler in the universe of Southeros and pandemonium reigns. Shan, the gorilla king of the Space kingdom wants to rule all Six Kingdoms in the universe of Southeros. He needs the support of 3 more kingdoms to be the ruler.Each kingdom has an animal emblem and Shan needs to send a message with the animal in the message to win them over.

LAND emblem - Panda, WATER emblem - Octopus, ICE emblem - Mammoth, AIR emblem - Owl, FIRE emblem - Dragon.

Once he wins 3 more kingdoms, he is the ruler! The secret message needs to contain the letters of the animal in their emblem. For example, secret message to the Land kingdom (emblem: Panda) needs to have the letter 'p','n','d' at- least once and 'a' at-least twice. If he sends "a1d22n333a4444p" to the Land kingdom, he will win them over.

2. Breaker of chains: The other kingdoms in the Universe also yearn to be the ruler of Southeros and war is imminent! The High Priest of Southeros intervenes and is trying hard to avoid a war and he suggests a ballot system to decide the ruler. Your coding challenge is to help the High Priest choose the ruler of Southeros through the ballot system.

Rules of the Ballot system

  1. Any kingdom can compete to be the ruler.

  2. They should send a message to all other kingdoms asking for allegiance.

  3. This message will be put in a ballot from which the High Priest will pick 6 random messages.

  4. The High Priest then hands over the 6 messages to the respective receiving kingdoms.

  5. The kingdom that receives the highest number of allegiance is the ruler.

Solution

Run maven clean install to install the dependencies

  1. Framework support : Maven
    1. Run maven test to install dependencies
    2. Run maven exec:java to execute the application
  2. IDE Support : Intellij
    1. Run tests: https://www.jetbrains.com/help/idea/creating-run-debug-configuration-for-tests.html
    2. Run Application : https://www.jetbrains.com/help/idea/running-applications.html

About


Languages

Language:Java 100.0%