Closed goyalyashpal closed 2 years ago
The inclusion of 0 is to match a standard domino set. The default value is for a double-six set (https://en.wikipedia.org/wiki/Dominoes#Tiles_and_suits). Another common set size is a double-nine set, which contains 0 through 9, inclusive.
Yes, changing it to 1 to N would slightly simplify some of the underlying math, but it would not match real-life dominoes. It's more intuitive for a user to put in "6" for a set of 0 through 6, despite it giving a 7x8 grid. If this game were not based on real-life objects, then this change would be arbitrary. But I believe it's better to keep it in line with standard domino sets.
Even Wikipedia says "This formula can be simplified a little bit when n is made equal to the total number of doubles in the domino set".
ohkay. i have never played, never seen, never even heard about such numbered dominoes. so, didnt know about this.
had only seen the blank dominoes in those "dominoes chain effect" videos lol. and i thought that any rectangular tiles used for that purpose are called dominoes.
but anyways, thanks for replying as a contributor, as i really had the impressions that devt here has stopped and my inputs will be going in vain.
also, this wont be a trivial change owing to the game id, so, i guess this issue can be closed for good 🥲
grid size = 2 × Σk (1 to N) = (N+1) × N
duplicate search: 🔍 dominosa numbers