Coverage Summary for Class: Node (com.mygdx.game.AI)

Class Class, % Method, % Line, %
Node 100% (1/1) 100% (3/3) 100% (5/5)


1 package com.mygdx.game.AI; 2  3 import com.badlogic.gdx.math.Vector2; 4  5 /** 6  * A node in the A* pathfinding graph 7  */ 8 public class Node { 9  private final Vector2 position; 10  public float cost; 11  12  /** 13  * Position the node exists at 14  * 15  * @param x co-ord 16  * @param y co-ord 17  */ 18  public Node(float x, float y) { 19  position = new Vector2(x, y); 20  cost = -1; 21  } 22  23  public Vector2 getPosition() { 24  return position; 25  } 26  27  /** 28  * Sets position 29  * 30  * @param x co-ord 31  * @param y co-ord 32  */ 33  public void set(float x, float y) { 34  position.set(x, y); 35  } 36 }