dex = 1
list/attackers = list()
list/defenders = list()
id = "Battle[(rand(1,9999))]"
attackers = _attackers
defenders = _defenders
var/list/actors = attackers+defenders
for(var/mob/Actor/a in actors)
curActor = a
world<<"[a] - [a.tp]"
world<<"Now is [curActor] Turn"
var/mob/Actor/A1 = new(_name="Slow Enemy", _dex=0.5)
var/mob/Actor/A2= new(_name="Enemy ", _dex=1)
var/mob/Actor/A3= new(_name="Fast Enemy 3 ", _dex=2)
battle = new /Battle(list(A1, A2, A3), list(src))
var/Battle/curBattle = src.battle
Hello, i have question about performance, can anyone help me figure how to replace this ugly part where i use for() proc for taking a current Actor?
I'm sure i can replace this by using list and a little bit of math for calculate positions. Can anyone help me with this algoritm?
Maybe method with for loop is nice idea and ii don't have to change it?