Skip to content

Arnauld/extreme-carpaccio-java-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extreme-carpaccio Java based server implementation

Developer's notes

$ mvn clean install

Overrides configuration with VM argument.

-DquestionGenerator.scriptPaths=/Users/Arnauld/Projects/extreme-carpaccio-springboot/script/questions.groovy,\
                                /Users/Arnauld/Projects/extreme-carpaccio-springboot/script/priceWithTax.groovy,\
                                /Users/Arnauld/Projects/extreme-carpaccio-springboot/script/insurance.groovy

Architecture

                           +-------------------------+
Dashboard ---------------> |                         |
                           |  SpringBoot Web         | {WebController.java} ...> {Players.java}
Player registration -----> |                         |                            ^
                           |                         |                           /
                           | ----------------------- |                       ...' 
                           |                         | {Game.java} .........'
      Player 1 <---------  |                         |        :             `....> {QuestionGenerator.java}
      Player 2 <---------  |  RxNetty Clients        |        v
       ...                 |    / Observable         | {RxNettyDispatcher.java}
      Player n <---------  |                         |

                           +-------------------------+

Usage

  • thecodinggame.groovy, invalid-insurance.groovy, insurance-iteration-1.groovy, technical-invalid-requests.groovy

STEP 1 : with each weight at 0.0 except insurance-iteration-1 at 1.0

line 120 --> change data (uncomment) RULES = cover (basic 1.8) * nb travellers * duration days (return date - departure date)

STEP 2 : weight at 0.0 for all except thecodinggame at 1.0

goal : let the team slices RULES = cover * sum risk travellers * min (7, duration days) * country + options

STEP 3 : in thecodinggame.quote(), set phase3On to True, then play with the multiple if

RULES = ANNOUNCE changes, and uncomment/add if cases BONUS : start to send invalid quotes, by modifying the weight of invalid-insurance and codingame

STEP 4 : TDD - change frequency (less for more TDD), activate roman by setting phase4On to True in thecodinggame.quote()

STEP 5 : replace the nextQuestion with the commented one REPLACE FOR IT5

RULES : find offers to send instead of quote, offers format is an array like {"offers":["off1","off2"]}

Protocol

Price with tax

{
  "quantities" : [1, 3, 6, 2],
  "prices" : [1.2, 3.6, 7.5, 8.2],
  "reduction": "Standard|HalfPrice|PayThePrice",
  "country": "NL"
}
{
  "total":12.3
}

Question

{
  "question":"Which word in the list designate a programming language?",
  "choices":["jawa","jaba","java"]
}
{
  "response":"java"
}
{
  "question":"What is 4 plus 5?"
}
{
  "response":"9"
}

Insurrance

{
  "country":"PL",
  "departureDate":"2016-11-15",
  "returnDate":"2016-12-09",
  "travellerAges":[32,39],
  "options":["SportsAndActivities","MedicalConditions"],
  "cover":"Premier"
}
{
  "quote": 234.5,
  "options":["SportsAndActivities","MedicalConditions"]
}

Inspirations

About

Java implementation of the Extreme-caparccio server

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published