socket fixes, fix tank jumping
This commit is contained in:
parent
9620703efc
commit
b3dacbd6f6
1 changed files with 45 additions and 47 deletions
|
|
@ -1,9 +1,11 @@
|
|||
using System.Diagnostics;
|
||||
using TanksServer.GameLogic;
|
||||
|
||||
namespace TanksServer.Models;
|
||||
|
||||
[DebuggerDisplay("({X} | {Y})")]
|
||||
internal readonly struct TilePosition(ushort x, ushort y)
|
||||
{
|
||||
public ushort X { get; } = (ushort)((x + MapService.TilesPerRow) % MapService.TilesPerRow);
|
||||
public ushort Y { get; } = (ushort)((y + MapService.TilesPerColumn) % MapService.TilesPerColumn);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue