-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show user times #82
base: master
Are you sure you want to change the base?
Show user times #82
Conversation
This more properly reflects the meaning of the time shown -- wait time implies that it's the time before the user boards an elevator. Commute time is clearly the time before boarding plus the time it takes for the elevator to travel to the desired floor.
To display more stats we could use more space. Turn the average/max stats into a table so we get more vertical space.
Give players more information about the commute times experienced by individual elevator users so they can design better algorithms.
Showing individual wait and travel times is tricky since showing all three time values at once will result in an even-more cluttered display. So we will add code to allow the user to select which time to display on the individual users by clicking on the appropriate row in the time statistics table. We must stop re-rendering the stats template on each stats change because it interferes with receiving input in the stats area. Replace the templatized rendering with jQuery code searching on specific element identifiers.
Let the player select which timer values to display by clicking the corresponding row in the statistics table. Clicking the row with the clock icon disables timer display. Like the time scale and code, the value to display is saved in local storage.
There are enough statistics that small numbers of floors (such as 3 found on the first level) clip the statistics display. Change the layout so that the statistics box is never clipped by the floor level.
This doesn't seem to affect the appearance but it is more consistent with the rest of the values in style.css
Comments? Questions? |
Several good changes but I'm worried about performance. |
I haven't looked at rendering performance. If it does make it worse my guess is the table layout code is what would do it. Since the table's number of rows and columns never change the most likely thing that could cause the layout code to do work is a change in the value of the table entries reflecting the stats. I used jQuery's text() rather than HTML to try to avoid any layout reflows but that may not be sufficient. If I can't use a table there then the stats list gets rather long. I could probably use div + span with hardcoded widths -- after all, the size of font and total available width are already fixed. |
This series adds some summary statistics, reformats the statistics box to more compactly show the average and max stats, and enables displaying of time values on individual elevator users so that players can better understand the flaws in their code.
This should solve the following issues reported on github:
Issue #77
Issue #52