Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>You'll start wondering if Weapon should inherit from the player base class.

Probably not. If you want to do that, they should both implement an interface (and perhaps share some code through composition) but code inheritance is likely not the right approach here.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: