Skip to content

Commit

Permalink
feat(SafeValue): ⚡ add some SafeValue
Browse files Browse the repository at this point in the history
  • Loading branch information
shangfengh committed Oct 28, 2023
1 parent 895c19d commit ba86dad
Show file tree
Hide file tree
Showing 10 changed files with 1,613 additions and 790 deletions.
2 changes: 1 addition & 1 deletion logic/GameClass/GameObj/Areas/Construction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace GameClass.GameObj.Areas;

public class Construction : Immovable
{
public LongWithVariableRange HP => throw new NotImplementedException();
public LongInTheVariableRange HP => throw new NotImplementedException();
public override bool IsRigid => constructionType == ConstructionType.Community;
public override ShapeType Shape => ShapeType.Square;
private ConstructionType constructionType = ConstructionType.Null;
Expand Down
2 changes: 1 addition & 1 deletion logic/GameClass/GameObj/Areas/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GameClass.GameObj.Areas;
public class Home : Immovable, IHome
{
public AtomicLong TeamID => throw new NotImplementedException();
public LongWithVariableRange HP => throw new NotImplementedException();
public LongInTheVariableRange HP => throw new NotImplementedException();
public long Score => throw new NotImplementedException();
public override bool IsRigid => false;
public override ShapeType Shape => ShapeType.Square;
Expand Down
2 changes: 1 addition & 1 deletion logic/GameClass/GameObj/Areas/Wormhole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GameClass.GameObj.Areas;

public class Wormhole : Immovable, IWormhole
{
public LongWithVariableRange HP => throw new NotImplementedException();
public LongInTheVariableRange HP => throw new NotImplementedException();
public List<XY> Entrance => throw new NotImplementedException();
public List<XY> Content => throw new NotImplementedException();
public override bool IsRigid => HP > GameData.WormholeHP / 2;
Expand Down
8 changes: 4 additions & 4 deletions logic/GameClass/GameObj/Ship.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ public override bool IgnoreCollideExecutor(IGameObj targetObj)
return true;
return false;
}
public LongWithVariableRange HP { get; }
public LongWithVariableRange Armor { get; }
public LongWithVariableRange Shield { get; }
public LongInTheVariableRange HP { get; }
public LongInTheVariableRange Armor { get; }
public LongInTheVariableRange Shield { get; }
private ShipType shipType = ShipType.Null;
public ShipType ShipType => shipType;
private ShipStateType shipState = ShipStateType.Null;
public ShipStateType ShipState => shipState;
private readonly IOccupation occupation;
public IOccupation Occupation => occupation;
public IntNumUpdateByCD BulletNum { get; }
public IntNumUpdateEachCD BulletNum { get; }
private IProducer? producer = null;
public IProducer? ProducerModule => producer;
private IConstructor? constructor = null;
Expand Down
2 changes: 1 addition & 1 deletion logic/Preparation/Interface/IHome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Preparation.Interface
public interface IHome
{
public AtomicLong TeamID { get; }
public LongWithVariableRange HP { get; }
public LongInTheVariableRange HP { get; }
public long Score { get; }
public void AddScore(long add);
}
Expand Down
8 changes: 4 additions & 4 deletions logic/Preparation/Interface/IShip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ namespace Preparation.Interface
public interface IShip : IMovable
{
public AtomicLong TeamID { get; }
public LongWithVariableRange HP { get; }
public LongWithVariableRange Armor { get; }
public LongWithVariableRange Shield { get; }
public LongInTheVariableRange HP { get; }
public LongInTheVariableRange Armor { get; }
public LongInTheVariableRange Shield { get; }
public ShipType ShipType { get; }
public ShipStateType ShipState { get; }
public IntNumUpdateByCD BulletNum { get; }
public IntNumUpdateEachCD BulletNum { get; }
public long SetShipState(RunningStateType running, ShipStateType value = ShipStateType.Null, IGameObj? obj = null);
public bool ResetShipState(long state, RunningStateType running = RunningStateType.Null, ShipStateType value = ShipStateType.Null, IGameObj? obj = null);
}
Expand Down
Loading

0 comments on commit ba86dad

Please sign in to comment.