separate folders per functionality
This commit is contained in:
parent
7f00160780
commit
0ca6a91a7e
33 changed files with 60 additions and 113 deletions
|
|
@ -1,6 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
|
||||
namespace TanksServer.Services;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class BulletManager
|
||||
{
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
using TanksServer.Helpers;
|
||||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class CollideBulletsWithMap(BulletManager bullets, MapService map) : ITickStep
|
||||
{
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class CollideBulletsWithTanks(
|
||||
BulletManager bullets, TankManager tanks, SpawnQueueProvider spawnQueueProvider
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
using System.Diagnostics;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using TanksServer.TickSteps;
|
||||
|
||||
namespace TanksServer.Services;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class GameTickWorker(
|
||||
IEnumerable<ITickStep> steps,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
public interface ITickStep
|
||||
{
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
|
||||
namespace TanksServer.Services;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class MapService
|
||||
{
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class MoveBullets(BulletManager bullets) : ITickStep
|
||||
{
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class MoveTanks(
|
||||
TankManager tanks, IOptions<TanksConfiguration> options, MapService map
|
||||
TankManager tanks,
|
||||
IOptions<TanksConfiguration> options,
|
||||
MapService map
|
||||
) : ITickStep
|
||||
{
|
||||
private readonly TanksConfiguration _config = options.Value;
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class RotateTanks(TankManager tanks, IOptions<TanksConfiguration> options) : ITickStep
|
||||
{
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class ShootFromTanks(
|
||||
TankManager tanks,
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class SpawnNewTanks(TankManager tanks, MapService map, SpawnQueueProvider queueProvider) : ITickStep
|
||||
{
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
using TanksServer.Models;
|
||||
|
||||
namespace TanksServer.Services;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class SpawnQueueProvider
|
||||
{
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
using System.Collections;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using TanksServer.Models;
|
||||
|
||||
namespace TanksServer.Services;
|
||||
namespace TanksServer.GameLogic;
|
||||
|
||||
internal sealed class TankManager(ILogger<TankManager> logger) : IEnumerable<Tank>
|
||||
{
|
||||
|
|
@ -4,4 +4,6 @@ global using System.Collections.Generic;
|
|||
global using System.Linq;
|
||||
global using System.Threading;
|
||||
global using System.Threading.Tasks;
|
||||
global using Microsoft.Extensions.Logging;
|
||||
global using Microsoft.Extensions.Options;
|
||||
global using TanksServer.Models;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
using TanksServer.Helpers;
|
||||
using TanksServer.GameLogic;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class BulletDrawer(BulletManager bullets): IDrawStep
|
||||
{
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
using TanksServer.DrawSteps;
|
||||
using TanksServer.GameLogic;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class DrawStateToFrame(
|
||||
IEnumerable<IDrawStep> drawSteps, LastFinishedFrameProvider lastFrameProvider
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using TanksServer.ServicePointDisplay;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal interface IDrawStep
|
||||
{
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using TanksServer.ServicePointDisplay;
|
||||
|
||||
namespace TanksServer.Services;
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class LastFinishedFrameProvider
|
||||
{
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
using TanksServer.Helpers;
|
||||
using TanksServer.Models;
|
||||
using TanksServer.GameLogic;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class MapDrawer(MapService map) : IDrawStep
|
||||
{
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using TanksServer.Helpers;
|
||||
using TanksServer.GameLogic;
|
||||
using TanksServer.ServicePointDisplay;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.DrawSteps;
|
||||
namespace TanksServer.Graphics;
|
||||
|
||||
internal sealed class TankDrawer : IDrawStep
|
||||
{
|
||||
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue