actors :: Creature :: defaultinit
actors :: Creature :: samecount=
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
actors :: Creature :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).actors :: Creature :: samecount=
class Creature
actor
var place: MeetingPlace
var color: Int
var id: Int
var count = 0
var samecount = 0
fun run do
loop
var p = place.meet(id, color)
if p == null then break
color = p.color
if p.sameid then samecount += 1
count += 1
end
end
fun to_string: String do return count.to_s + " " + numbers[samecount]
end
lib/actors/examples/chameneos-redux/chameneosredux.nit:24,1--43,3