Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ATile
- {
- public double g; // from start to this tile
- public double h; // heuristic to finish
- public double f = g + h;
- public ATile(){}
- }
- //to w innej klasie
- private ATile aTiles[][];
- aTiles = new ATile[dimension][dimension];
- for (int i = 0; i < dimension; i++)
- {
- for (int j = 0; j < dimension; j++)
- {
- aTiles[i][j].g = (double)Math.round(countDistance(3, 3, i, j)*100)/100; // NullPointerException tutaj
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment