All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
Raed Tabani wrote:Thanks man, it did the trick for me
although im wondering why is checking the type of sth is considered bad practise?
That is correct. The problem is not using enter later on. You need to push the enter key more frequently. Then your code would be easier to read.Raed Tabani wrote: . . . whenever i open a curly brace my hand autmatically smashes enter
. . .
Not sure I understand that, but it doesn't sound good.Raed Tabani wrote: . . . Would it be a better idea to create objects for comparison reasons only?
And as several people myself included have already told you, that is poor design.For me, the reason i used .getClass.equal() is that i needed a way to check " which subClass does this refrence index point to" is it a healingmove or a fightingmove as different actions are to be taken.