Advertisement
Guest User

Untitled

a guest
May 25th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.31 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package dk.sdu.mmmi.cbse.osgienemy;
  7.  
  8. /**
  9.  *
  10.  * @author mehgn
  11.  */
  12. public class Node {
  13.  
  14.     private int i, j;
  15.     private Node parent;
  16.     private int h, f;
  17.     private boolean solution;
  18.  
  19.     public boolean isSolution() {
  20.         return solution;
  21.     }
  22.  
  23.     public void setSolution(boolean solution) {
  24.         this.solution = solution;
  25.     }
  26.  
  27.     public Node(int i, int j) {
  28.         this.i = i;
  29.         this.j = j;
  30.     }
  31.    
  32.     @Override
  33.     public String toString(){
  34.         return "[" + i + ", " + j + "]";
  35.     }
  36.  
  37.     public int getI() {
  38.         return i;
  39.     }
  40.  
  41.     public void setI(int i) {
  42.         this.i = i;
  43.     }
  44.  
  45.     public int getJ() {
  46.         return j;
  47.     }
  48.  
  49.     public void setJ(int j) {
  50.         this.j = j;
  51.     }
  52.  
  53.     public Node getParent() {
  54.         return parent;
  55.     }
  56.  
  57.     public void setParent(Node parent) {
  58.         this.parent = parent;
  59.     }
  60.  
  61.     public int getH() {
  62.         return h;
  63.     }
  64.  
  65.     public void setH(int h) {
  66.         this.h = h;
  67.     }
  68.  
  69.     public int getF() {
  70.         return f;
  71.     }
  72.  
  73.     public void setF(int f) {
  74.         this.f = f;
  75.     }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement