Created
July 1, 2019 06:32
-
-
Save karuhi/3de5a57128225f844a81472951bdfedd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Field, Visited; | |
void main() { | |
Field = [ | |
[1, 1, 0, 0, 0], | |
[1, 0, 1, 1, 0], | |
[1, 1, 1, 0, 1], | |
[0, 0, 0, 1, 0], | |
[0, 0, 0, 0, 0], | |
]; | |
Visited = [ | |
[true, true, true, true, true, true, true], | |
[true, false, false, false, false, false, true], | |
[true, false, false, false, false, false, true], | |
[true, false, false, false, false, false, true], | |
[true, false, false, false, false, false, true], | |
[true, false, false, false, false, false, true], | |
[true, true, true, true, true, true, true] | |
]; | |
addWall(Field, 5); | |
} | |
void addWall(var list, int fillObject) { | |
var length = list.length; | |
var allWall = new List.filled(length+2, 5); | |
print("$allWall"); | |
//list.insert(0,allWall); | |
list.add(allWall); | |
for (int i = 0; i < length; i++) { | |
list[i].insert(0,5); | |
} | |
print("$Field"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment