mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-18 08:23:12 +00:00
88ddc5822e
Reduces some boilerplate constructors/equality compares
13 lines
No EOL
367 B
C#
13 lines
No EOL
367 B
C#
namespace PKHeX.Core
|
|
{
|
|
public readonly record struct TurnStartInstruction(TurnStartCode TurnCode, int Count)
|
|
{
|
|
public TurnStartInstruction(byte Op) : this()
|
|
{
|
|
TurnCode = (TurnStartCode)(Op >> 4);
|
|
Count = Op & 0xF;
|
|
}
|
|
|
|
public byte GetRawValue => (byte) ((Count & 0xF) | ((byte) TurnCode << 4));
|
|
}
|
|
} |