Alex Kerr
unread,Nov 2, 2010, 11:15:07 AM11/2/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nullpomino-dev
Can we please clean up the structure a bit? LineRaceMode and
ScoreRaceMode contain identical (or nearly identical functions) such
as pieceLocked(), onLineClear(), onARE(), renderLast(), and so on. If
they're going to extend NetDummyMode, that class should probably have
any code that can be reused.
In cases where additional code needs to be executed, the function
override should look something like this:
public boolean onARE(GameEngine engine, int playerID) {
//mode specific code goes here
return super.onARE();
}
If we keep going ahead full speed ahead with copy-paste like this, it
is going to make it harder and harder to add functionality over time.
We should take the time to follow good practices or clean up old code
when possible.