It is currently 29 Oct 2025, 22:19
   
Text Size

Some notes on recent commits

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Some notes on recent commits

Postby Max mtg » 26 Dec 2012, 23:33

1.
Code: Select all
    public static final Predicate<Card> hasListController(final List<Player> pList) {
This method has bad name, so that one cannot get what it does right from its name.

Consider renaming to "isConrolledByAnyOf"* - that is we're looking for cards controlled by any player on list passed as parameter.
__
* or something else meaningful that would help to read code invoking this method as a natural language sentence

2.
I am very upset with checkstyle applied to gametype.java file. It has ruined the table-like declaration of the game formats. I shall rollback that.

2a.
same about magiccolor.java.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Some notes on recent commits

Postby moomarc » 27 Dec 2012, 05:32

Max mtg wrote:1.
Code: Select all
    public static final Predicate<Card> hasListController(final List<Player> pList) {
This method has bad name, so that one cannot get what it does right from its name.

Consider renaming to "isControlledByAnyOf"* - that is we're looking for cards controlled by any player on list passed as parameter.
__
* or something else meaningful that would help to read code invoking this method as a natural language sentence
Thanks for the idea. I knew my name sounded wrong but at the time I couldn't think of anything better. Will change later today.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times


Return to Developer's Corner

Who is online

Users browsing this forum: LetMeThrough and 15 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 16 users online :: 1 registered, 0 hidden and 15 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: LetMeThrough and 15 guests

Login Form