Skip to content

Matchup Algorithm has flaws #2

Description

@AkeelAli
  1. the first iteration places repeating quotes (this is because the first iteration has only 1 left circular shift, and hence, the right quote appears in the next matchup)
  2. Storing all the quotes in the session is not a good idea (possiblity of cookie overflow). It may be possible to have a scheme of indexes to follow, but such an approach would present a challenge (how will we update the previous matchup's attributes if we don't store the order? maybe we can pass previous indexes that battled and which one?)
  3. If you're going to keep using session, make sure to add a timer (so that it doesn't last too long, and end up overflowing as the user stores more and more stuff in the session)
  4. If you want to randomize, http://stackoverflow.com/questions/2752231/random-record-in-activerecord

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions