diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-10 14:01:43 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-10 14:01:43 +0200 |
commit | ed517bbfd0e10abd9bc571131188061a7221d103 (patch) | |
tree | 1c2d4e6b68f785d1f9be8af3ac30c18ea8f234ad /Piece.gd | |
parent | 560b2702f1dfe2836c7127dbae7f7d3b515510c6 (diff) | |
download | godot-hexgrid-ed517bbfd0e10abd9bc571131188061a7221d103.zip godot-hexgrid-ed517bbfd0e10abd9bc571131188061a7221d103.tar.gz |
implement possible_moves()
Diffstat (limited to 'Piece.gd')
-rw-r--r-- | Piece.gd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Piece.gd b/Piece.gd new file mode 100644 index 0000000..7564d0f --- /dev/null +++ b/Piece.gd @@ -0,0 +1,20 @@ +#warning-ignore-all:unused_argument +extends Node2D + +class_name Piece, "res://godot/Piece.png" + +func get_mp() -> int: + print("Piece#get_mp() must be overriden in a subclass") + return 0 + +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: + print("Piece#move_cost() must be overriden in a subclass") + return 1 + +func at_least_one_tile() -> bool: + print("Piece#at_least_one_tile() must be overriden in a subclass") + return true |