# Fakes live gameplay so the banner developer has moving numbers to build # against. Called on each leaderboard cache refresh (~once a minute); each call # adds a handful of random players across random countries, most of them done. # # TEMPORARY: set ENABLED = false (or delete this) and wipe the players table # before the game goes live. class DemoActivity ENABLED = true def self.simulate! return unless ENABLED countries = I18n.t("countries").keys.map(&:to_s) rand(5..20).times do Player.create!( locale: "en", country: countries.sample, is_done: rand < 0.7 ) end end end