improved turtle kernel
This commit is contained in:
parent
96c6595846
commit
82939e53cc
@ -6,7 +6,7 @@ using tink.CoreApi;
|
||||
|
||||
class Turtle {
|
||||
public static var instance:Turtle;
|
||||
public static var MAX_SLOTS(default, null):Int = 15;
|
||||
public static final MAX_SLOTS:Int = 16;
|
||||
|
||||
@:allow(kernel.Init)
|
||||
private function new() {
|
||||
@ -200,7 +200,8 @@ class Turtle {
|
||||
return cc.Turtle.compareTo(otherSlot + 1);
|
||||
}
|
||||
|
||||
public function transferToSlot(to:TurtleSlot, ?count:Int):Outcome<Noise, Noise> {
|
||||
public function transfer(from:TurtleSlot, to:TurtleSlot, ?count:Int):Outcome<Noise, Noise> {
|
||||
this.selectSlot(from);
|
||||
var r = cc.Turtle.transferTo(to + 1, count);
|
||||
return r ? Outcome.Success(null) : Outcome.Failure(null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user