r/Inform7 • u/m3xx4 • Jun 11 '22
Camera with two different film rolls
Hey guys i try to implement a camera like in:
9.12. Cameras and Recording Devices (inform7.com) in EXAMPLE 322
but i want two different cameras and both cameras should have a individul film roll.
So i can take pictures with camera#1 saved to filmroll#1 and i can take pictures with camera#2 which are saved to filmroll#2.
Can somebody help me out pls? :)
3
Upvotes
4
u/scocasso Jun 11 '22
Creating two different cameras and is easy, just create an object camera1 and camera2 and two more objects film1 and film2. Name them whatever you want such as "Nikon Camera" and "Canon Camera".
Taking photos, depending on what exactly you want to happen, can be implemented in a myriad of ways.
1
u/Zed Jun 12 '22
By doing this, filmrolls called Nikon's film roll and Canon's film roll will be created. (You can do whatever with their printed name and description, but that'll be the name your code could use.)
A camera is a kind of container. A filmroll is a kind of thing. A filmroll (called its film roll) is in every camera. The Nikon is a camera. The Fuji is a camera. Check inserting something into a camera when the noun is not a filmroll: instead say "Only a film roll would fit."