FloodFill #2
6
main.cpp
6
main.cpp
|
|
@ -46,12 +46,16 @@ void flood(struct maze* maze, struct mmstats* mmstats) {
|
||||||
myqueue.push({7,9,0});
|
myqueue.push({7,9,0});
|
||||||
myqueue.push({8,9,0});
|
myqueue.push({8,9,0});
|
||||||
|
|
||||||
|
|
||||||
marked[7][7] = 1; /* las celdas del centro tienen */
|
marked[7][7] = 1; /* las celdas del centro tienen */
|
||||||
marked[7][8] = 1; /* un valor de cero porque son */
|
marked[7][8] = 1; /* un valor de cero porque son */
|
||||||
marked[8][7] = 1; /* la meta. */
|
marked[8][7] = 1; /* la meta. */
|
||||||
marked[8][8] = 1;
|
marked[8][8] = 1;
|
||||||
|
|
||||||
|
API::setText(7, 7, 0);
|
||||||
|
API::setText(7, 8, 0);
|
||||||
|
API::setText(8, 7, 0);
|
||||||
|
API::setText(8, 8, 0);
|
||||||
|
|
||||||
while (myqueue.size()) {
|
while (myqueue.size()) {
|
||||||
i = myqueue.front().x;
|
i = myqueue.front().x;
|
||||||
j = myqueue.front().y;
|
j = myqueue.front().y;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user