tag:blogger.com,1999:blog-7523569453469773247.post2842832361677638948..comments2015-02-11T12:13:10.578+01:00Comments on Laterna Magica: MtG programming: DamageUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7523569453469773247.post-6514378251999980272010-08-01T09:17:59.537+02:002010-08-01T09:17:59.537+02:00my point was not putting the checks in several pla...my point was not putting the checks in several places but to put every of the effects into one place. say sometimes there's a card like:<br /><br />"damage dealt by warriors causes a +1/+1 counter to be put on that creature in addition to other effects"<br /><br />I definitely don't want to check for that creature in the damage class.<br /><br />Exceptions: these checks are just to make sure I call the methods right. In the normal program flow, this exception should never be thrownSilly Freakhttps://www.blogger.com/profile/09963238585847993157noreply@blogger.comtag:blogger.com,1999:blog-7523569453469773247.post-83124241146672136422010-08-01T06:47:59.960+02:002010-08-01T06:47:59.960+02:00putting lifelink, wither, etc. in one place is goo...putting lifelink, wither, etc. in one place is good idea. at the beginning, I've made a mistake putting checking for various damage aspects in several places - this causes some issues later.<br /><br />btw, are you planning to use IllegalArgumentException in you workflow or is it just for protection to make sure nothing goes wrong (I mean using runtime exceptions to stop the game whenever it is in wrong state - in this case "damage was dealt to non creature\non planeswalker")?nantuko84https://www.blogger.com/profile/15891352523600843744noreply@blogger.com