I am pretty sure this can be simplified further.  Let's talk.

On Friday, April 18, 2014, Eric Ricketts <notifications@github.com> wrote:

> In app/assets/javascripts/Hand.js:
>
> > +};
> > +
> > +Hand.prototype.numberOfPairs = function () {
> > +  return this._pairs.length / 2;
> > +};
> > +
> > +Hand.prototype.returnRankAtIndex = function(index) {
> > +  return this._cards[index].returnRank();
> > +};
> > +
> > +Hand.prototype.matchCard = function(index, card) {
> > +  return ( (card.returnRank() == this._cards[index].returnRank()) &&
> > +  (card.returnSuit() == this._cards[index].returnSuit()) );
> > +};
> > +
> > +Hand.prototype.bubbleSortHand = function() {
>
> Ken,
> Fixed it. I just had to run through each of the three cases function
> compareTwoCards(card1, card2) {
> if (card1.compareCards(card2)) {
> return 1;
> }
> if (card2.compareCards(card1)) {
> return -1;
> }
> return 0;
> }
> worked like a charm after that.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/EricRicketts/GoodCleanGames/pull/2/files#r11783982>
> .
>


-- 
Ken Auer
Software Craftsman
RoleModel Software              919-557-7550 (v)
6720 RoleModel Way            626-544-2015 (f)
Holly Springs, NC 27540       919-622-8315 (m)

    "Christianity is not a plug-in, it's an operating system" (see Mark
12:28-31)