2024-04-13 16:27:45 +02:00
|
|
|
using System.Diagnostics;
|
2024-04-12 18:32:10 +02:00
|
|
|
using TanksServer.GameLogic;
|
|
|
|
|
2024-04-07 13:02:49 +02:00
|
|
|
namespace TanksServer.Models;
|
|
|
|
|
2024-04-13 16:27:45 +02:00
|
|
|
[DebuggerDisplay("({X} | {Y})")]
|
2024-11-12 18:27:04 +01:00
|
|
|
internal readonly struct TilePosition(ulong x, ulong y)
|
2024-04-12 18:32:10 +02:00
|
|
|
{
|
2024-11-12 18:27:04 +01:00
|
|
|
public ulong X { get; } = (ulong)((x + MapService.TilesPerRow) % MapService.TilesPerRow);
|
|
|
|
public ulong Y { get; } = (ulong)((y + MapService.TilesPerColumn) % MapService.TilesPerColumn);
|
2024-04-13 16:27:45 +02:00
|
|
|
}
|