[Kde-games-devel] [PATCH] KSame: add info about points for marked stones
Albert Astals Cid
aacid at kde.org
Wed Apr 2 22:18:03 CEST 2008
A Dimecres 02 Abril 2008, Rafał Miłecki va escriure:
> 2008/3/31, Albert Astals Cid <aacid at kde.org>:
> > Ok, i hate when this happens, so let's just pretend i'm the game
> > mantainer :-)
> >
> > I have a problem with your patch, the thing is that now there are two
> > places where score is calculated, board.cpp:254 and mainwindow.cpp:195
> > and that in my opinion is a bad idea, because if in the future someone
> > decides to change how score is calculated it is easy that it will be
> > forgotten to change in one of the places.
> >
> > So could you please do this?
> >
> > Create a static function on board that calculates the score given the
> > stones and use it both in board.cpp:254 and mainwindow.cpp:195
>
> Thanks for your review! Of course your were 100% right about my poor
> solution. I prepared static function just like you said and used it in
> both places. Do you agree me to commit this patch I attached to my
> mail? Hope this one is OK.
>
> > Also i like more the "Marked: %1 (%2 Points)" than the "Marked: %1
> > (Points: %2)" construct, what do you think?
>
> I agree, it sounds better. Good point.
Please go ahead. Only trunk branch of course.
And welcome to kdegames hacking :-)
Albert
More information about the kde-games-devel
mailing list