/// <summary> /// Changes the Hitzones to the Hitzones of newRace /// </summary> /// <param name="newRace">Name of the Race</param> public void RaceChanged(string newRace) { _view.HitzonesClearGrid(); Hitzones newHitZone = _hitFab.getZonesFor(newRace); _view.HitzonesAddBodyParts(newHitZone.getHitzoneNames(), newHitZone.getHitzoneStartIndices(), newHitZone.getHitzoneEndIndices()); }
public void ReturnsRandomHitzone() { Hitzones hitZ = HitFab.getZonesFor(HitFab.AvailableRaces[0]); Assert.Multiple(() => { Assert.IsNotNull(hitZ.randomizeHitzone()); Assert.IsNotEmpty(hitZ.randomizeHitzone().ZoneName); }); }
/// <summary> /// Initial setup of the View (fill with predefined values) /// </summary> private void LoadView() { string defaultRace = _hitFab.AvailableRaces[0]; Hitzones defaultHitZone = _hitFab.getZonesFor(defaultRace); _view.HitzonesClearGrid(); _view.HitzonesAddBodyParts(defaultHitZone.getHitzoneNames(), defaultHitZone.getHitzoneStartIndices(), defaultHitZone.getHitzoneEndIndices()); _view.HitzonesSetAvailableRaces(_hitFab.AvailableRaces); _view.selectedRace = defaultRace; }
public void RandomHitzoneIsRandom() { Hitzones hitZ = HitFab.getZonesFor(HitFab.AvailableRaces[0]); bool isRand = false; for (int i = 0; i < 1000; i++) { if (hitZ.randomizeHitzone().LastDiceThrow != hitZ.randomizeHitzone().LastDiceThrow) { isRand = true; break; } } Assert.IsTrue(isRand); }
public void HitzoneContainsBodyparts() { Hitzones hitZ = HitFab.getZonesFor(HitFab.AvailableRaces[0]); Assert.GreaterOrEqual(hitZ.Bodyparts.Count, 1); }
public void HitzonesAvailable() { Hitzones hitZ = HitFab.getZonesFor(HitFab.AvailableRaces[0]); Assert.NotNull(hitZ); }
/// <summary> /// Constructor for the CHaractersheet /// </summary> /// <param name="hitzone"></param> /// <param name="defaultWeapon"></param> public CharacterSheet(Hitzones hitzone, Weapon defaultWeapon) { Hitzone = hitzone; _Weapon = defaultWeapon; Status = new StatusSheet(); }