mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-17 16:03:10 +00:00
9401b7a790
help dat compiler minor clean elsewhere
21 lines
No EOL
805 B
C#
21 lines
No EOL
805 B
C#
namespace PKHeX.Core
|
|
{
|
|
public readonly struct TurnStartInstruction
|
|
{
|
|
public readonly TurnStartCode TurnCode;
|
|
public readonly int Count;
|
|
|
|
public TurnStartInstruction(byte Op)
|
|
{
|
|
TurnCode = (TurnStartCode)(Op >> 4);
|
|
Count = Op & 0xF;
|
|
}
|
|
|
|
public byte GetRawValue => (byte) ((Count & 0xF) | ((byte) TurnCode << 4));
|
|
|
|
public override bool Equals(object obj) => obj is TurnStartInstruction t && t.GetRawValue == GetRawValue;
|
|
public override int GetHashCode() => GetRawValue;
|
|
public static bool operator ==(TurnStartInstruction left, TurnStartInstruction right) => left.Equals(right);
|
|
public static bool operator !=(TurnStartInstruction left, TurnStartInstruction right) => !(left == right);
|
|
}
|
|
} |