From f74f29daef22c497a24c678e515f38f9204ad9c2 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 22 Aug 2020 16:49:31 +0200 Subject: [PATCH] Make it possible to inherit from BattleBuilder. --- PkmnLibSharp/Battling/Battle/BattleBuilder.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PkmnLibSharp/Battling/Battle/BattleBuilder.cs b/PkmnLibSharp/Battling/Battle/BattleBuilder.cs index e314886..f4b5dd4 100644 --- a/PkmnLibSharp/Battling/Battle/BattleBuilder.cs +++ b/PkmnLibSharp/Battling/Battle/BattleBuilder.cs @@ -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 _parties = new List(); + protected readonly BattleLibrary _library; + protected readonly bool _canFlee; + protected readonly byte _numberOfSides; + protected readonly byte _pokemonPerSide; + protected ulong? _seed; + protected readonly List _parties = new List(); 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;