croquet / microverse

Croquet Microverse (Beta)
Other
181 stars 53 forks source link

Setup/teardown methods not mentioned in class docs #22

Open codefrau opened 2 years ago

codefrau commented 2 years ago

These are essential methods to override so should be documented.

yoshikiohshima commented 2 years ago

Where would be the "class docs"? IOW, where would we write it? They are mentioned but not in a reference manual style.

codefrau commented 2 years ago

Maybe as an abstract base class? I think behaviors might be more understandable if they were declared like class MyActor extends ActorBehavior or something like that and then we could document all the methods in ActorBehavior (possibly including the Card methods reachable via this?)

Alternatively, they could be empty stubs in CardActor so they would be listed in https://croquet.io/docs/microverse/CardActor.html as overridable in behaviors. Since this in a behavior refers to (a proxy of) the Card that might make sense, too.

yoshikiohshima commented 2 years ago

Yeah, having a dummy base classes might help the editor and documentation. Anselm had some ideas about that under different names but ActorBehavior and PawnBehavior would be much better names. a bit of trouble would be that the editor still have to find it and it might involve import and those and that makes other parts more complex.