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

Tournament overview table, few bug fixes

Location:
exampleparties/simpleshaop/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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.