> -----Original Message----- > From: devl-bounces at freenetproject.org > [mailto:devl-bounces at freenetproject.org] On Behalf Of Matthew Toseland > > > > Modified: > > trunk/plugins/WoT/introduction/IntroductionPuzzle.java > > Log: > > - Provide boolean to store whether a puzzle was solved, keep solved > > puzzles > in pool until they expire: We need to store them at least for > 1 day for being able to check which index value is free. > > - Add function for getting a free index value > > - Change constructor to take the mDateOfInsertion as > parameter instead > > of > setting it to current time: this prevents the rare problem that > getFreeIndex() is called before midnight and the puzzle is > contructed after midgnight. > > This is to avoid solving the same puzzle twice?
It's to avoid that when a new day begins puzzle insertion could start with an index not equal 0 but with the highest index of the previous day instead. It would happen if we fetched the time from the system clock every time we need it and not *once* and then store it.
