2 ms·
Why are you reading a couple of ifs instead of having the two similar things represented by separate classes with shared functionality in a common class? Or eve
by scarface74 7y ago
Why are you reading a couple of ifs instead of having the two similar things represented by separate classes with shared functionality in a common class? Or even if you prefer composition to inheritance you could still make it work cleaner without a bunch of if statements.