I'm trying to create a Vista MainSyper clone. Right now my highlighted algorithm is a waterfall algorithm, it looks like a class that grows bigger and bigger I saw in Vista Monenegepar, when its gameover, it runs again in a circular way to highlight the mines through the game . Does anyone know where this algorithm is? Thank you
You can find the nearest official name for the description algorithm, which is an algorithm in a spiral way Output the path to fully scan a grid.
A simple algorithm (2n + 1) ^ 2, n> 0 will look like this for the clock scan of a square grid of size:
(in the lower left corner of the grid
- Start from the center cell of the grid (
- left for the next cell (-1.0)
- Set the movement direction upwards (0, + 1)
- While the current cell (X, Y) is not a corner (i.e. (xn) ^ 2 == (YN) ^ 2), move in the set direction
- If the current cell is not (0,0)
- direction clockwise turn
- (0, + 1) (+1)
- (+ 1,0) -> (0, -1)
- (0, -1) -> (-1.0)
- (-00) -> (
- Once Upon a New Direction
- Getty Step 4
< Li> If you have an existing cell (0,0), you are done for <2} (2n) ^ 2 size and for non-square grid , you have to first 3 steps. - direction clockwise turn
There is an implementation available for class grid for Perl in the spiral object of Sarre-Tour module.
No comments:
Post a Comment