tag:blogger.com,1999:blog-7822724728240718962.post5855952683634446525..comments2018-12-05T04:51:19.768-06:00Comments on Project Atreus: Overrides and ShadowsSamhttp://www.blogger.com/profile/17331920536919533002noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7822724728240718962.post-60156961311147170682008-07-26T19:24:00.000-05:002008-07-26T19:24:00.000-05:00CreatureList inherits from List because it allows ...CreatureList inherits from List because it allows sorting if the underlying values implement IComparable - which makes throwing a CreatureList into an InitiativeList a snap.<BR/><BR/>InitiativeList inherits from LinkedList because I need an explicit, not necessarily enumeratable, order to the list (I need to know who has the next turn, who had the last turn, etc. and I'd prefer to just track who has the current turn). Also, because it allows arbitrary insertion into the list through AddFirst, AddLast, AddBefore, and AddAfter. I need to be able to do that and still be able to find the next turn due to the ability to "Ready" an action or "Delay" your turn to another spot in the initiative order.<BR/><BR/>It should all make sense when I commit what I'm working on right now.Samhttps://www.blogger.com/profile/17331920536919533002noreply@blogger.comtag:blogger.com,1999:blog-7822724728240718962.post-10700680940860951742008-07-26T19:19:00.000-05:002008-07-26T19:19:00.000-05:00Thanks for posting that! The whole "Shadows" thin...Thanks for posting that! The whole "Shadows" thing has always been a bit confusing. Question: why not just inherit from BindingList?Anonymousnoreply@blogger.com