diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-19 18:17:36 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-19 18:17:36 +0200 |
commit | 2320bc526783ac3fb86e52dde07e8bb736a76286 (patch) | |
tree | 8080437f639775e67b3c113153a8972c534cbf72 /Piece.gd | |
parent | fa92fda3e7ea53d479402dcdbd153177ef030c21 (diff) | |
download | godot-hexgrid-2320bc526783ac3fb86e52dde07e8bb736a76286.zip godot-hexgrid-2320bc526783ac3fb86e52dde07e8bb736a76286.tar.gz |
document public API
Diffstat (limited to 'Piece.gd')
-rw-r--r-- | Piece.gd | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3,18 +3,22 @@ extends Node2D class_name Piece, "res://godot/Piece.png" +# movement points func get_mp() -> int: print("Piece#get_mp() must be overriden in a subclass") return 0 +# movement point bonus if you start your movement on a road and follow it func road_march_bonus() -> int: print("Piece#road_march_bonus() must be overriden in a subclass") return 0 -func move_cost(src : Tile, dst : Tile, a : int) -> int: +# movement cost from a Tile to another adjacent Tile +func move_cost(src : Tile, dst : Tile, orientation : int) -> int: print("Piece#move_cost() must be overriden in a subclass") return -1 # impracticable -func at_least_one_tile() -> bool: +# are you allowed to move into that Tile as only move even if you don't have enough movement points +func at_least_one_tile(dst : Tile) -> bool: print("Piece#at_least_one_tile() must be overriden in a subclass") return true |