Files
ActionBlock/actionBlocks_server/src/ActionBlocks.Game/Core/Cell.cs
T
2026-10-24 21:16:18 +02:00

15 lines
461 B
C#

namespace ActionBlocks.Game.Core;
/// <summary>One board cell. <see cref="ItemId"/> is set when the cell carries an item.</summary>
public readonly record struct Cell(byte Color, string? ItemId = null)
{
public static readonly Cell Empty = new(CellColor.Empty);
public bool IsEmpty => Color == CellColor.Empty;
}
public readonly record struct Point(int X, int Y)
{
public static Point operator +(Point a, Point b) => new(a.X + b.X, a.Y + b.Y);
}