Before we continue with adding single player modes to Netplay...

1 view
Skip to first unread message

Alex Kerr

unread,
Nov 2, 2010, 11:15:07 AM11/2/10
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.

Zircean

unread,
Nov 2, 2010, 12:21:56 PM11/2/10
to nullpom...@googlegroups.com
CODEWALKKKKKKKK

Zircean Draconnia

unread,
Nov 2, 2010, 12:37:46 PM11/2/10
to nullpomino-dev
Okay, I guess I should explain myself a little better. We should do a
code review sometime in the near future. And not just over netplay
(although a netplay code review would be ace in and of itself), but of
the entire project. There are a lot of things we can clean up.

Olivier Vidal

unread,
Nov 2, 2010, 12:39:18 PM11/2/10
to nullpom...@googlegroups.com
This is a legitimate concern, however the code has become so massive and intricated that it would need someone very brave to clean it up.
Are you that person, the chosen one ? :)

2010/11/2 Zircean <zir...@gmail.com>

NullNoname

unread,
Nov 4, 2010, 11:50:11 AM11/4/10
to nullpomino-dev
I moved some common codes to NetDummyMode in r531-533.
But yes, we need more cleanups, especially NetVSBattleMode :p

On Nov 3, 1:39 am, Olivier Vidal <olivier.vid...@gmail.com> wrote:
> This is a legitimate concern, however the code has become so massive and
> intricated that it would need someone very brave to clean it up.
> Are you that person, the chosen one ? :)
>
> 2010/11/2 Zircean <zirc...@gmail.com>
>
> > CODEWALKKKKKKKK
Reply all
Reply to author
Forward
0 new messages