This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-04-04 01:32:25

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Minesweeper scripting mathematics

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?


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

#2 2013-04-05 09:35:27

dusty22
Scratcher
Registered: 2012-09-28
Posts: 49

Re: Minesweeper scripting mathematics

What do you mean the number "base 10" exactly? How is that a decimal? It almost sounds like you're talking about logarithms.

Last edited by dusty22 (2013-04-05 09:36:53)

Offline

 

Board footer