From 427adbaa73ae955994c2be0d3cb92f9b0becfd02 Mon Sep 17 00:00:00 2001 From: JBM Date: Thu, 21 May 2020 22:45:49 +0200 Subject: [PATCH 1/1] That fencepost inconsistency turned out NOT to be a breaking change. --- PLAN.org | 31 ++++++++- config/statement_en.html | 66 +++++-------------- config/stub.txt | 10 +-- src/main/java/com/codingame/game/Referee.java | 20 +++--- 4 files changed, 61 insertions(+), 66 deletions(-) diff --git a/PLAN.org b/PLAN.org index db53c65..bab4ab0 100644 --- a/PLAN.org +++ b/PLAN.org @@ -7,4 +7,33 @@ * TODO referee cleanup * DONE upgrade deps * TODO Timings -* TODO fenceposts +* DONE fenceposts +* Quotes + Trolls, it is said, were bred by Melkor because he desired a race as powerful as the giant Ents, the Tree-herds. + David Day in Tolkien : The Illustrated Encyclopaedia (1993), p. 226 + + The folk belief … is that lightning seeks out trolls and giants, perhaps a reflection the giant-slaying of Thor in Old Norse mythology. Many informants have told collectors that the reason the giants or trolls are no longer populous is the accuracy and efficiency of the lightning strokes. + John Lindow, in Swedish Folktales and Legends (1978), p. 89 + + Senator Stampingston: Gentlemen, it's clear that we're in a universally precarious situation. Dethklok has summoned a troll. + General Crozier: That's impossible, there's no such thing as trolls. + Senator Stampingston: Then how do you explain the dead unicorns? + Metalocalypse, Dethtroll, episode 1.04 (2006) + + They were trolls. Obviously trolls. Even Bilbo, in spite of his sheltered life, could see that: from the great heavy faces of them, and their size, and the shape of their legs, not to mention their language, which was not drawing-room fashion at all, at all. + J. R. R. Tolkien, The Hobbit (1937), Chapter 2: "Roast Mutton" + + Trolls are slow in the uptake, and mighty suspicious about anything new to them. + J. R. R. Tolkien, The Hobbit (1937), Chapter 2: "Roast Mutton" + + Trolls simply detest the very sight of dwarves (uncooked). + J. R. R. Tolkien, The Hobbit (1937), Chapter 2: "Roast Mutton" + + Trolls do not build. + J. R. R. Tolkien, The Fellowship of the Ring (1954), Book I, Chapter 12: "Flight to the Ford"; said by Strider. + + 'Now is the time!' cried Gandalf. 'Let us go, before the troll returns!' + J. R. R. Tolkien, The Fellowship of the Ring (1954), Book II, Chapter 5: "The Bridge of Khazad-Dûm" + + Trolls are only counterfeits, made by the Enemy in the Great Darkness, in mockery of Ents, as Orcs were of Elves. + J. R. R. Tolkien, The Two Towers (1954), Book III, Chapter 4: "Treebeard" diff --git a/config/statement_en.html b/config/statement_en.html index 89a0e27..37a5605 100644 --- a/config/statement_en.html +++ b/config/statement_en.html @@ -20,52 +20,6 @@ turn if you have any left. -
-

-   - Breaking Change -

-

- The roadLength game input variable used to be the - cardinal number of positions the troll could be in. That's the - way it was presented in the original game, but I leaned more - towards distances to make the I/O protocol easier on beginners. - So it's currently inconsistent. -

-

- This is going to change in the following days to be a distance - everywhere, more in line with the protocol's other measures. - Not to mention being somewhat more consistent with the variable - name. Thanks - - @Snef - - for reminding me of this. -

-

- If you used this variable, I suggest you temporarily used one - of these workarounds so you don't get bit by the upcoming - change: -

- - - - - - - - - - - - - - - - - -
Former useAs aTry this
roadLength - 1
distance to opponent
roadLength & (~1)
roadLength
number of troll states
roadLength | 1
roadLength + 1
I have no idea
(roadLength + 1) & (-1)
-

  @@ -151,10 +105,10 @@

- - - - + + + +
Road lengthStones
715
730
1530
1550
615
630
1430
1450

As with anything in this draft statement, this @@ -169,6 +123,9 @@ Change Log