using Godot; using System; public partial class BoardScreen : Node2D { private const string RED_CHIP_PATH = "res://scenes/red_chip.tscn"; private const string YELLOW_CHIP_PATH = "res://scenes/yellow_chip.tscn"; private const int CHIP_SCALE = 3; private const int CHIP_SIZE = 24; private const int CHIP_PADDING = 2; private const int CHIP_X_OFF = -(CHIP_SIZE + CHIP_PADDING) * 7 / 2 + (CHIP_SIZE + CHIP_PADDING) / 2; private const int Y_OFF = 300; private const int CARD_CENTER_X_DEFAULT = -536; private PackedScene redChip; private PackedScene ylwChip; private Node2D player1Card; private Node2D player2Card; private PlayerData p1; private PlayerData p2; private RigidBody2D[,] chips = new RigidBody2D[6, 7]; // 6 rows 7 cols | 0, 0 is top left // Called when the node enters the scene tree for the first time. public override void _Ready() { // Node initialization player1Card = GetNode("Player1Card"); player2Card = GetNode("Player2Card"); redChip = GD.Load(RED_CHIP_PATH); ylwChip = GD.Load(YELLOW_CHIP_PATH); } // Called every frame. 'delta' is the elapsed time since the previous frame. public override void _Process(double delta) { if(p1 != null) { Label username = player1Card.GetNode