first commit

This commit is contained in:
2026-01-19 17:44:00 -05:00
commit e2b7d6616a
67 changed files with 1608 additions and 0 deletions

47
Gameplay/BusinessCard.cs Normal file
View File

@@ -0,0 +1,47 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
public partial class BusinessCard : TextureButton
{
public Player _player;
public Goal _goal;
public GoalName _goalName;
public bool _goalMet = false;
public override void _Ready()
{
base._Ready();
_goal = GetNode<Goal>("Goal");
}
public override void _Pressed()
{
base._Pressed();
GD.Print("Pressed");
_player._activeEnemy.Defeat(_goalName);
_player.Challenge(_player._activeEnemy._owner._board._owner);
}
public void AssignGoal(GoalName GOALNAME)
{
_goalName = GOALNAME;
}
public void CheckGoal()
{
List<Cell> ownedCells = _player._board.GetCellsByOwner(_player);
List<int> addresses = _goal.GetAddresses(_goalName);
_goalMet = addresses.All(a=>ownedCells.Select(c=>c._address).ToList().IndexOf(a)>-1);
GD.Print(_goalMet);
Disabled = !_goalMet;
GD.Print(Disabled);
}
public void PassPlayer(Player PLAYER)
{
_player = PLAYER;
}
}