I still struggle with objects in I7, and since this seems to be the bread and butter for creating new things in the world, I’d like to ask some questions here (after trying out things, after reading the documentation). My lack in OOPL experience is probably the reason why I struggle so much.
The term “class” is not used in I7, but I don’t know how to refer to “kind of” things otherwise, so apologies here, if I don’t stick to the right terminology.
Question number one would be if classes can refer to other classes.
I know that relations define ‘pointers’ between objects, but is it possible to do this on class level? I think the answer is “yes” as this chapter of the documentation tells me.
However, using something like:
nightwear is a kind of wearable thing. pockets are a kind of container. all nightwear have pockets.
produces an error - it seems that pockets are seen as property, but I am using the possession relation here from the standard rules (
The verb to have means the possession relation.), so shouldn’t that tell I7 that this is not a property, but another class I am referring to?
Otherwise I find it difficult to deal with
kind of value. That is again an object, but how do I specify better the ‘type of the value’?
To make it more concrete, I was trying to define a date. I know there is an extension for including dates of the real world into a game, but I’m not really interested in a real date. Looking at my code, I can already see that many things must be wrong or missing, I simply find it difficult to put my finger on exactly what:
A date is a kind of value. A month is a kind of value. A year is a kind of value. A day is a kind of value. A date has a day. A date has a month. A date has a year. Current date is a date. The day of current date is 4. The month of current date is 5. The year of current date is 2021.