7.8.0.1

7 — The Administrator

Due Thursday, 31 October 2019, midnight

Delivery Place the product of this week’s project steps into your repo as follows:

Design Task A software architecture often still emerges from a number of ad hoc decisions on the design of components. Sooner or later someone will have to write down how things hang together because your Tsuro.com idea has taken off and you need more software developers.

Write up a navigation document for your code base. The document should explain
  • what the components are,

  • how they statically depend on each other, and

  • how they dynamically interact with each other.

You may use ASCII art to describe relationships with diagrams but add text as necessary to make sure it is clear.

Create a test script xtest that runs all unit tests for your entire code base.

Programming Task

Testing Task Develop a test harness for the referee using first-s as the player strategy.

The input is an array of three to five JSON strings, which represent the names of the players. The Players are arranged in descending order of age.

The output is an object with two fields:

    A ranking is:

      { "winners" : [sorted-string-array, ...], "cheaters" : rank sorted-string-array }

      The sequence of sorted-string-arrays in the "winners" field drops

      trailing empty array. Fields with empty arrays are also dropped from the object.

    

    A sorted-string-array is:

      [String, ...]

      where the Strings are ordered in ascending, lexicographic manner.

Each sorted-string-array represents one rank of the final outcome. The first one collects all first-place finishers, the second one the second-place finishers, and so on.

Hint Your programming language is likely to provide a predicate for such comparisons. For example, in BSL (the smallest PL that I know you know) you get string<? and it behaves like this:

Examples:
> (string<? "DanielA" "DanielB")

#t

> (string<? "DanielB" "DanielA")

#f

> (string<? "DanielFrontLeft" "DanielFrontRight")

#t

Create two tests and place them in ref-tests.