January 2020
Intermediate to advanced
532 pages
13h 31m
English
We shall first create a module called Vehicle. The purpose of this module is to implement our space-travel logic. As we want to keep this module generic, we will design an interface that any object can implement in order to participate in our space-travel program.
The structure of the module consists of four sections, as indicated by the following embedded comments:
module Vehicle# 1. Export/Imports# 2. Interface documentation# 3. Generic definitions for the interface# 4. Game logic end # module
Let's see how the code is actually written in the module:
# 1. Export/Importsexport go!
# 2. Interface documentation ...
Read now
Unlock full access