Make it possible to inherit from BattleBuilder.
This commit is contained in:
parent
a2cf693bbd
commit
f74f29daef
|
@ -6,12 +6,12 @@ namespace PkmnLibSharp.Battling
|
|||
{
|
||||
public class BattleBuilder
|
||||
{
|
||||
private readonly BattleLibrary _library;
|
||||
private readonly bool _canFlee;
|
||||
private readonly byte _numberOfSides;
|
||||
private readonly byte _pokemonPerSide;
|
||||
private ulong? _seed;
|
||||
private readonly List<BattleParty> _parties = new List<BattleParty>();
|
||||
protected readonly BattleLibrary _library;
|
||||
protected readonly bool _canFlee;
|
||||
protected readonly byte _numberOfSides;
|
||||
protected readonly byte _pokemonPerSide;
|
||||
protected ulong? _seed;
|
||||
protected readonly List<BattleParty> _parties = new List<BattleParty>();
|
||||
|
||||
public BattleBuilder(BattleLibrary library, bool canFlee, byte numberOfSides = 2, byte pokemonPerSide = 1)
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace PkmnLibSharp.Battling
|
|||
return this;
|
||||
}
|
||||
|
||||
public Battle Build()
|
||||
public virtual Battle Build()
|
||||
{
|
||||
// Use the milliseconds since epoch time as random seed if none is specified.
|
||||
_seed ??= (ulong) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds;
|
||||
|
|
Loading…
Reference in New Issue