Skip to content

Commit

Permalink
feat(Occupations): ✨ add NullOccupation
Browse files Browse the repository at this point in the history
  • Loading branch information
asdawej committed Nov 1, 2023
1 parent c279906 commit b4cc258
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions logic/GameClass/GameObj/Occupations/NullOccupation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Preparation.Interface;

namespace GameClass.GameObj.Occupations;

public class NullOccupation : IOccupation
{
public int MoveSpeed => 0;
public int MaxHp => 0;
public int ViewRange => 0;
}
2 changes: 1 addition & 1 deletion logic/GameClass/GameObj/Occupations/OccupationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ public static class OccupationFactory
ShipType.CivilShip => new CivilShip(),
ShipType.WarShip => new WarShip(),
ShipType.FlagShip => new FlagShip(),
_ => throw new System.NotImplementedException(),
_ => new NullOccupation()
};
}

0 comments on commit b4cc258

Please sign in to comment.