Page 1 of 1

Some notes on recent commits

PostPosted: 26 Dec 2012, 23:33
by Max mtg
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.

Re: Some notes on recent commits

PostPosted: 27 Dec 2012, 05:32
by moomarc
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.