The little object we programmed respects quite well object-oriented programming style (well normally one does not program individual objectcs but rather generic ones, but would not change programming style). We respected:
Modularity: Verbs only operate on slots of the object to which they belong.
Why is that important ? Let's assume a player wanted to know how much information he remembered and deleted in a given interval of time.
Now we could:
player.info_counter = player.info_counter + 1;
This is not a very flexible way of doing things. It is MUCH better to
write a verb on the player called something like ``update_info_counting
''
that does the job. This way we could customize information counting
for different players, or program a turn-on/off function.
Don't try to program this for the moment, since it will only
work on your own character. Rather go to the Generic Objects
and Permission tutorial.
The code you wrote is hopefully a good example on how to use the MOO programming language, but it is not a very example on how you should develop software. Things that are missing are:
[ok I have to say a bit more here]
Also, this tutorial does not really force you program a lot by yourself.
So, once you are done with this tutorial, you can try to add functionalities
to thes objects, or have it behave in different ways. As an example,
look at Thora's flower (#2783 @ TecfaMOO
) and figure out the differences.