GODPAPER | All Packages | All Classes | Index | Frames No Frames |
IAStar

Package | com.lookbackon.ds
Interface | public interface IAStar
Implementors | AStarNodeBoard

Holds a two-dimensional array of Nodes methods to manipulate them, start node and end node for finding a path. Notice: this class code base based on some open source code.

Public Properties

| Property | Defined By
--- | --- | ---
|  | endNode : AStarNode [read-only] Returns the end node. | IAStar
|  | startNode : AStarNode [read-only] Returns the start node. | IAStar

Public Methods

| Method | Defined By
--- | --- | ---
|  | getNode(x:int, y:int):AStarNode Returns the node at the given coords. | IAStar
|  | setEndNode(x:int, y:int):void Sets the node at the given coords as the end node. | IAStar
|  | setStartNode(x:int, y:int):void Sets the node at the given coords as the start node. | IAStar
|  | setWalkable(x:int, y:int, value:Boolean):void Sets the node at the given coords as walkable or not. | IAStar

Property Detail

endNode | property

`endNode:AStarNode` [read-only]

Returns the end node.

Implementation
`public function get endNode():AStarNode`

startNode | property |

`startNode:AStarNode` [read-only]

Returns the start node.

Implementation
`public function get startNode():AStarNode`
Method Detail

getNode | () | method

`public function getNode(x:int, y:int):AStarNode`

Returns the node at the given coords.

Parameters

| `x:int` — The x coord.
| `y:int` — The y coord.

Returns

| `AStarNode`

setEndNode | () | method |

`public function setEndNode(x:int, y:int):void`

Sets the node at the given coords as the end node.

Parameters

| `x:int` — The x coord.
| `y:int` — The y coord.

setStartNode | () | method |

`public function setStartNode(x:int, y:int):void`

Sets the node at the given coords as the start node.

Parameters

| `x:int` — The x coord.
| `y:int` — The y coord.

setWalkable | () | method |

`public function setWalkable(x:int, y:int, value:Boolean):void`

Sets the node at the given coords as walkable or not.

Parameters

| `x:int` — The x coord.
| `y:int` — The y coord.
| `value:Boolean`

Thu Jan 16 2014, 01:11 PM +08:00