feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
This commit is contained in:
23
SVSim.BattleEngine/Engine/BaseCardIDComp.cs
Normal file
23
SVSim.BattleEngine/Engine/BaseCardIDComp.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using Wizard.Battle;
|
||||
|
||||
internal class BaseCardIDComp : EqualityComparer<IReadOnlyBattleCardInfo>
|
||||
{
|
||||
public override bool Equals(IReadOnlyBattleCardInfo x, IReadOnlyBattleCardInfo y)
|
||||
{
|
||||
if (x == y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (x.BaseParameter.BaseCardId == y.BaseParameter.BaseCardId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode(IReadOnlyBattleCardInfo obj)
|
||||
{
|
||||
return obj.BaseParameter.BaseCardId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user