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

Package | com.lookbackon.ds
Class | public class AStarNodeBoard
Inheritance | AStarNodeBoard Object
Implements | IAStar

It is a similar of bitboard struct,and every cell representation a star node.

See also

http://www.fzibi.com/cchess/bitboards.htm
http://en.wikipedia.org/wiki/Asearch_algorithm

Public Properties

| Property | Defined By
--- | --- | ---
|  | column : int | AStarNodeBoard
|  | endNode : AStarNode [read-only] | AStarNodeBoard
|  | row : int | AStarNodeBoard
|  | startNode : AStarNode [read-only] | AStarNodeBoard

Public Methods

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

Property Detail

column | property

`column:int`

Implementation
`public function get column():int`
`public function set column(value:int):void`

endNode | property |

`endNode:AStarNode` [read-only]

Implementation
`public function get endNode():AStarNode`

row | property |

`row:int`

Implementation
`public function get row():int`
`public function set row(value:int):void`

startNode | property |

`startNode:AStarNode` [read-only]

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

AStarNodeBoard | () | Constructor

`public function AStarNodeBoard(column:int, row:int)`

Parameters

| `column:int`
| `row:int`

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`

toString | () | method |

`public function toString():String`

Returns

| `String`

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