tanks can spawn and get rendered
This commit is contained in:
parent
151cad4cee
commit
a3bd582b2e
1 changed files with 283 additions and 105 deletions
|
|
@ -1,6 +1,8 @@
|
|||
using TanksServer.Models;
|
||||
|
||||
namespace TanksServer.Services;
|
||||
|
||||
internal class MapService
|
||||
internal sealed class MapService
|
||||
{
|
||||
public const int TilesPerRow = 44;
|
||||
public const int TilesPerColumn = 20;
|
||||
|
|
@ -35,8 +37,8 @@ internal class MapService
|
|||
|
||||
private char this[int tileX, int tileY] => _map[tileX + tileY * TilesPerRow];
|
||||
|
||||
public bool IsCurrentlyWall(int tileX, int tileY)
|
||||
public bool IsCurrentlyWall(TilePosition position)
|
||||
{
|
||||
return this[tileX, tileY] == '#';
|
||||
return this[position.X, position.Y] == '#';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue