Untitled
unknown
d
2 months ago
591 B
7
Indexable
module island; static final const class Island { static: private: // It is private by default, this is the little building on the island. // The back room of the building. Boat[] boatStock = []; public: // But if you go to the front desk and ask, they can get you what you need if they carry it at this facility. Boat buyBoat() { if (boatStock.length == 0) { buildMoreBoats(); } Boat thisBoat = boatStock[(boatStock.length) - 1]; boatStock.popBack(); return thisBoat; } private: void buildMoreBoats() { boatStock ~= Boat(); // etc. } }
Editor is loading...
Leave a Comment