grid with randomly assigned token types out of 4 choices

This commit is contained in:
Jack Case
2025-08-18 20:44:32 -04:00
parent cb2caa44cd
commit 9526275e3d
5 changed files with 44 additions and 5 deletions

View File

@@ -1,7 +1,9 @@
extends Node2D
var rows: int = 5
var cols: int = 5
@export var rows: int = 5
@export var cols: int = 5
@export var offset: float = 55.0
var grid: Array
@@ -13,5 +15,5 @@ func _ready():
for column in cols:
var token_node = token.instantiate()
add_child(token_node)
token_node.position = Vector2(10*row, 10*column)
token_node.position = Vector2(offset*row, offset*column)
grid[row].append(token_node)