]> Untitled Git - catris.git/commitdiff
Added to_string to piece
authorClifton Palmer <clifton.james.palmer@protonmail.com>
Mon, 24 Mar 2025 09:41:54 +0000 (11:41 +0200)
committerClifton Palmer <clifton.james.palmer@protonmail.com>
Mon, 24 Mar 2025 11:14:55 +0000 (13:14 +0200)
script/board.gd
script/piece.gd

index 6ee9e7ad49ac3648b8230f39d9b5225dd4a242d3..f4057916203a76e3cc55e0b02873404c0d1a101e 100644 (file)
@@ -52,6 +52,7 @@ func _add_player_piece():
        
        add_child(piece)
        _num_pieces += 1
+       print(str(piece))
 
 
 func _move(v: Vector2i):
index aa50f0a231615b17828873e912d600f74718ee28..f2aa81c86cce545a99730c7408c3c871b60f1fa7 100644 (file)
@@ -26,3 +26,7 @@ func _ready() -> void:
                var pos_x: int = floori(c.position.x / block_size)
                var pos_y: int = floori(c.position.y / block_size)
                cell_grid.append(Vector2i(pos_x, pos_y))
+
+
+func _to_string() -> String:
+       return str(cell_grid)