Refatored Vertex class and changed initialization

This commit is contained in:
id101010
2016-06-16 23:57:26 +02:00
parent 8f5f5364c2
commit 598e17827a
2 changed files with 25 additions and 6 deletions

View File

@@ -94,6 +94,15 @@ public class Game {
Vertex v = new Vertex(0, dst);
int tmp, tmp_i = 0;
int alt = 0;
// Get a verticies list from the field data
for(int i = 0; i < size; i++){
for(int j = 0; i < size; i++){
if(field[i][j] == 0){
vertices.add(new Vertex(Integer.MAX_VALUE, new Point(i, j)));
}
}
}
for(int i = 0; i < size*size; i++){
vertices.add(new Vertex(Integer.MAX_VALUE, new Point(i%7,i%7))); // Initialize all vertices