So I'm making a minesweeper game, similar to this game that I posted recently; but with a larger area, smaller mines, and a scrolling option; as well as being less glitchy.
I've made the dimensions of the matrix which the "mines" would be in alterable, so people could decide how large their game would be, as well as how many mines they'd have.
I need to find a way to make it so I can identify each mine with a unique and calculable number, so that I can use other scripts to involve the adjacent mines, what I figured would be the best is to use base of one of the dimensions of the grid that the mines are within.
(An example of what I mean by "Base" is base 10, which is known as decimal, the popular counting system.)
Too long, didn't read? Skip to here.
The issue is that, as far as I know, Scratch only runs in decimal; and decimal is less confusing all together.
The base will change, since the dimensions of the grid are adjustable; so I need to convert the values to base 10 for simplicity.
Does anybody know of any formula that will allow me to convert a value that's Base x to base 10?
Offline