Integrate reviewed full action pack admission and bounded idle scheduling
This commit is contained in:
@@ -43,6 +43,16 @@ fun actionCheck() {
|
||||
now+=10001;controller.tick();release!!();check(statuses.last().status=="failed")
|
||||
check(controller.offer(plan(3)));confirm!!(false);release!!()
|
||||
check(statuses.last().status=="failed" && controller.active && picked.size==4)
|
||||
val repeated=mutableListOf<String>()
|
||||
var done: ((ActionEnd)->Unit)?=null
|
||||
val randomPlayer=object: ActionPlayer {
|
||||
override fun play(asset: ActionAsset,finished: (ActionEnd)->Unit,failed: ()->Unit) { repeated.add(asset.id);done=finished }
|
||||
override fun stop(released: ()->Unit) { released() }
|
||||
}
|
||||
val random=ActionController(pack,randomPlayer,{now},{it(true)},{},choose={it-1})
|
||||
check(random.offer(plan(20)));now+=1200;done!!(ActionEnd(true,true,true))
|
||||
check(random.offer(plan(21)));now+=1200;done!!(ActionEnd(true,true,true))
|
||||
check(repeated==listOf("asset_02","asset_02")) // Repeat is possible, not forced exact alternation.
|
||||
val missing=ActionController(null,player,{now},{confirm=it},{statuses.add(it)})
|
||||
check(missing.capability==null && !missing.offer(plan(5)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user