Created
January 16, 2016 20:31
-
-
Save avasilkov/76cc9266026f9d15badf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct Base{ | |
| virtual float getDistance() = 0; | |
| }; | |
| struct CanBeSmelled{ | |
| Smell smells[10]; | |
| Smell getSmell(); | |
| }; | |
| struct CanBeHeard{ | |
| Sound sounds[10]; | |
| Sound getSound(); | |
| }; | |
| struct CanBeSeen{ | |
| EyeInfo eyeInfoVec[10]; | |
| EyeInfo getEyeInfo(); | |
| }; | |
| struct Human : CanBeSeen, CanBeHeard, CanBeSmelled{ | |
| float getDistance()override{return distanceToHuman;} | |
| }; | |
| struct Wall : CanBeSeen{ | |
| float getDistance()override{return distanceToWall;} | |
| }; | |
| struct ShitOnTheGround : CanBeSeen, CanBeSmelled{ | |
| float getDistance()override{return distanceToWall;} | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment