Greetings All! And Happy Christmas and Happy New Year.
I am trying to find out what formula is used to determione the scores in the Gnome game Five or More, in which you score BY "lining up" 5 or more counters of the same colour on a 9x9 board. In fact it's a bit more general than that, and any 2 or more intersecting lines, where with your latest move you have made each line contain 5 or more counters all of the same colour, then you get a score which depends on the total number of counters in these lines. Theae counters arre then erased and their cells become empty.
For a single line (vertical or horizontal or diagonal) you can score with 5/6/7/8/9 counters. To score more than 9, you need at least three lines, which intersect at a single empty cell into which you then drop a counter of the same colour, combining 2 of the line into a line with 6/7/8/9 and with 4 more in the third ine. Then you score with 10/11/12/13 counters.
And, if I've got it right, the biggest number of counters you can score with is when you have 8 lines, each with four counters, intersecting at the centre of the 9x9 square which is still an empty cell; and then you drop a counter into that square, and then you score with 33 counters.
The "Help" page for gthe Gnome game says: Number of objects Score given 5 10 6 12 7 18 8 28 9 42 10 82 11 108 12 138 13 172 14 210
so it only goes up to 14 counters. However, as I describe above, one can go higher (up to "Number of objects" = 33.
Trying to give this a go, I did succeed in achieving 17 (four diagonal lines with 4, plus 1 for the cell where they meet), and my score jumped from somewhere in the hundreds to 4106; so clearly one can score in the thousands with "Number of objects" = 17.
But since I have seen no documentation which tells how many points you score for more than 14 counters, and have not seen any description which describes how the score is calculated from "Number of objects".
Does anyone know, or can find out?
with thanks, and best wishes to all, Ted.
On Mon, Dec 25, 2017 at 09:29:54PM +0000, Ted Harding wrote:
But since I have seen no documentation which tells how many points you score for more than 14 counters, and have not seen any description which describes how the score is calculated from "Number of objects".
Does anyone know, or can find out?
You can browser the source code via the web, the bit of source code you want is:
https://git.gnome.org/browse/five-or-more/tree/src/five-or-more.c
lines 134 defines the static counter scores and line 872 onwards contains the function that looks most applicable to what you want to know, with line 883 looking like the algorithm that calculates scores for scores higher than 14 counters. The only problem is that I don't really understand C all that well and have had a bit too much Christmas spirit to try and work it out right now.
Thanks Adam
On Tue, 2017-12-26 at 15:42 +0000, Adam Bower wrote:
On Mon, Dec 25, 2017 at 09:29:54PM +0000, Ted Harding wrote:
But since I have seen no documentation which tells how many points you score for more than 14 counters, and have not seen any description which describes how the score is calculated from "Number of objects".
Does anyone know, or can find out?
You can browser the source code via the web, the bit of source code you want is:
https://git.gnome.org/browse/five-or-more/tree/src/five-or-more.c
lines 134 defines the static counter scores and line 872 onwards contains the function that looks most applicable to what you want to know, with line 883 looking like the algorithm that calculates scores for scores higher than 14 counters. The only problem is that I don't really understand C all that well and have had a bit too much Christmas spirit to try and work it out right now.
Thanks Adam
Many thanks, Adam! That looks like exactly what I've been groping for!
As a seasonal comment (in the light of your enjoyment of the Christmas spirit): In Scotland, of course, Christmas is less important, and less festive, than New Year. Starting with Hogmanay (New Year's Eve), when people walk their local streets bearing bottles and visiting friends (who will have bottles in-house -- and the "First Footer" has the greatest choice amongst these), they celebrate all night and, following some repose, start to celebrate again on New Year's Day itself (which again may continue well into the night).
Uniquely within the UK, as well as New Year's Day being a public holiday (like everywhere else), so also is the next day, 2nd January, named "Hangover Day".
Best wishes to all, Ted.