Skip to content

Remove instanceof in Hero.add#28

Open
nguyent wants to merge 4 commits intowatabou:masterfrom
nguyent:master
Open

Remove instanceof in Hero.add#28
nguyent wants to merge 4 commits intowatabou:masterfrom
nguyent:master

Conversation

@nguyent
Copy link

@nguyent nguyent commented Dec 4, 2014

Hero.add relies on instanceof to apply Buffs, which leads to monolithic code. By decoupling the strings from Hero on to their respective Buffs, the resulting code in Hero.add becomes more readable.

@eridal
Copy link

eridal commented Jan 20, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants