Ignore:
Timestamp:
01/30/20 16:52:38 (4 years ago)
Author:
bart
Message:

Tournament overview table, few bug fixes

Location:
exampleparties/simpleshaop
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • exampleparties/simpleshaop/pom.xml

    r10 r11  
    66        <groupId>geniusweb.exampleparties</groupId>
    77        <artifactId>simpleshaop</artifactId>
    8         <version>1.0.0</version>
     8        <version>1.2.0</version>
    99        <packaging>jar</packaging>
    1010
     
    3333                        <groupId>geniusweb</groupId>
    3434                        <artifactId>party</artifactId>
    35                         <version>1.1.0</version>
     35                        <version>1.2.0</version>
    3636                </dependency>
    3737
     
    3939                        <groupId>geniusweb</groupId>
    4040                        <artifactId>bidspace</artifactId>
    41                         <version>1.1.0</version>
     41                        <version>1.2.0</version>
    4242                </dependency>
    4343                <dependency>
    4444                        <groupId>geniusweb</groupId>
    4545                        <artifactId>profileconnection</artifactId>
    46                         <version>1.1.0</version>
     46                        <version>1.2.0</version>
    4747                </dependency>
    4848                <dependency>
  • exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/ShaopParty.java

    r10 r11  
    1515import geniusweb.actions.Offer;
    1616import geniusweb.actions.PartyId;
    17 import geniusweb.bidspace.AllPartialBidsList;
     17import geniusweb.bidspace.AllBidsList;
    1818import geniusweb.issuevalue.Bid;
    1919import geniusweb.party.Capabilities;
     
    132132
    133133        private Offer randomBid() throws IOException {
    134                 AllPartialBidsList bidspace = new AllPartialBidsList(
     134                AllBidsList bidspace = new AllBidsList(
    135135                                profileint.getProfile().getDomain());
    136136                long i = random.nextInt(bidspace.size().intValue());
  • exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/SimpleLinearOrdering.java

    r10 r11  
    9494                DefaultPartialOrdering prof = (DefaultPartialOrdering) profile;
    9595                List<Bid> bidslist = prof.getBids();
     96                // NOTE sort defaults to ascending order, this is missing in docs.
    9697                Collections.sort(bidslist, new Comparator<Bid>() {
    9798
    9899                        @Override
    99100                        public int compare(Bid b1, Bid b2) {
    100                                 // notice, -1 if better because WORST bid first
    101                                 return prof.isPreferredOrEqual(b1, b2) ? -1 : 1;
     101                                return prof.isPreferredOrEqual(b1, b2) ? 1 : -1;
    102102                        }
    103103
  • exampleparties/simpleshaop/src/test/java/geniusweb/exampleparties/simpleshaop/SimpleLinearOrderingTest.java

    r10 r11  
    6464                SimpleLinearOrdering testprofile = new SimpleLinearOrdering(
    6565                                realprofile);
    66                 assertEquals(Arrays.asList(bid3, bid2, bid1), testprofile.getBids());
     66                assertEquals(Arrays.asList(bid1, bid2, bid3), testprofile.getBids());
    6767        }
    6868
Note: See TracChangeset for help on using the changeset viewer.