Randomized who starts the fight #41
Merged
Jonathan
merged 1 commits from randomise_fight_start into develop 4 weeks ago
@ -99,6 +99,23 @@ public class FighterTurn : IEnumerable<FightWorld.Fighter>
|
|||||||
return false;
|
|||||||
}
|
|||||||
|
|||||||
/// <summary>
|
|||||||
/// Sets the current one back
|
|||||||
/// This is an expensive operation, because the entire data structure needs to be circled
|
|||||||
|
kziolkowski
commented 1 month ago
Review
Danke für den Hinweis. Passiert das aktuell nur beim Kampfstart oder könnte das potenziell auch wann anders benutzt werden? Und wenn ja, ab wann würde das zu Problemen führen?
Jonathan
commented 4 weeks ago
Review
Passiert aktuell nur beim Kampfstart. |
|||||||
/// </summary>
|
|||||||
public void SpinBack()
|
|||||||
{
|
|||||||
if (_currentNode == null) return;
|
|||||||
|
|||||||
var node = _currentNode;
|
|||||||
while (node.next != _currentNode)
|
|||||||
{
|
|||||||
node = node.next;
|
|||||||
}
|
|||||||
|
|||||||
_currentNode = node;
|
|||||||
}
|
|||||||
|
|||||||
public IEnumerator<FightWorld.Fighter> GetEnumerator()
|
|||||||
{
|
|||||||
if (_currentNode == null) return Enumerable.Empty<FightWorld.Fighter>().GetEnumerator();
|
|||||||
|
|||||||
Loading…
Reference in new issue
warum nicht 50/50?
Wirkt "fairer" für den Spieler