buttonmen-dev / buttonmen

Buttonmen - an online dice game
Other
16 stars 24 forks source link

completed games no longer show up in the overview #297

Closed cgolubi1 closed 10 years ago

cgolubi1 commented 10 years ago

The index page no longer displays completed games.

cgolubi1 commented 10 years ago

Hmm. So... when i call loadActiveGames, the response i get is:

{
  "data": {
    "gameIdArray":["1","2","3","6","8","10","11","14"],
    "opponentIdArray":["2","2","3","4","5","5","4","6"],
    "opponentNameArray":["blackshadowshade","blackshadowshade","Jota","yawetag","ElihuRoot","ElihuRoot","yawetag","Fog"],
    "myButtonNameArray":["The GM","Synthia","Changeling","Kakita","Lion","Buck","Synthia","Buck"],
    "opponentButtonNameArray":["James","Synthia","Synthia","Kakita","Crab","Sydney","James","Hope"],
    "nWinsArray":["1","0","0","0","0","0","0","0"],
    "nDrawsArray":["0","0","0","0","0","0","0","0"],
    "nLossesArray":["0","0","2","0","0","0","0","0"],
    "nTargetWinsArray":["3","3","3","3","4","3","3","3"],
    "isAwaitingActionArray":["0","0","0","0","0","0","0","0"],
    "gameStateArray":["24","40","40","27","27","40","40","24"],
    "statusArray":["ACTIVE","ACTIVE","ACTIVE","ACTIVE","ACTIVE","ACTIVE","ACTIVE","ACTIVE"]
  },
  "message":"All game details retrieved successfully.",
  "status":"ok"
}

So... now that i think about it, it makes sense that loadActiveGames should only load active games... But we need to have some way to load information about completed games, even if it's not via the loadActiveGames function.

Thoughts?

irilyth commented 10 years ago

The old site had some kind of a "completed games" page, which might be a nice thing to have.

blackshadowshade commented 10 years ago

This change was caused by #286.

cgolubi1 commented 10 years ago

To clarify, we should have a new function, loadCompletedGames, to complement loadActiveGames, and the overview page should call both. I'll work on the UI part of this, and ask for help if i get stuck.

AdmiralJota commented 10 years ago

I seem to recall that the old site handled completed games in two different ways: one was a full history of all your past games that you could get to via a special page (like irilyth described), and the other was an area of the main landing page that showed notifications about the games that you had finished recently. Each of those notifications would remain there until you manually deleted it.