|
18 | 18 | db = sqlite3.connect(app_dir + '/../database.db')
|
19 | 19 | #TODO Change this to 1800 for production
|
20 | 20 | time_in_round = 1800
|
21 |
| -min_time_between_clicks = 1.0 # float seconds |
| 21 | +min_time_between_clicks = 0.5 # float seconds |
| 22 | +button_check_time = 0.25 # float seconds |
22 | 23 | spam_ban_time = 10.0 # float seconds
|
23 | 24 | flag_index = 0
|
24 | 25 |
|
@@ -216,11 +217,11 @@ def make_app():
|
216 | 217 | (r"/css/(.*)", tornado.web.StaticFileHandler, {"path": app_dir + "/public/css/"}),
|
217 | 218 | (r"/js/(.*)", tornado.web.StaticFileHandler, {"path": app_dir + "/public/js/"}),
|
218 | 219 | (r"/images/(.*)", tornado.web.StaticFileHandler, {"path": app_dir + "/public/images/"}),
|
219 |
| - ], cookie_secret="__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__", |
| 220 | + ], cookie_secret="CEHB0le6i7tXFsyIChKzQ7UOg2kgsako", |
220 | 221 | login_url = "/")
|
221 | 222 |
|
222 | 223 | def checkButton():
|
223 |
| - tornado.ioloop.IOLoop.current().add_timeout(time.time() + 1, checkButton) |
| 224 | + tornado.ioloop.IOLoop.current().add_timeout(time.time() + button_check_time, checkButton) |
224 | 225 | global kingOfTheHill
|
225 | 226 | global goingNegative
|
226 | 227 | if(kingOfTheHill != ""):
|
@@ -248,7 +249,7 @@ def resetRound():
|
248 | 249 | if __name__ == "__main__":
|
249 | 250 | app = make_app()
|
250 | 251 | app.listen(8888)
|
251 |
| - tornado.ioloop.IOLoop.current().add_timeout(time.time() + 1, checkButton) |
| 252 | + tornado.ioloop.IOLoop.current().add_timeout(time.time() + button_check_time, checkButton) |
252 | 253 | mins_to_half_hr = time.localtime().tm_min
|
253 | 254 | tornado.ioloop.IOLoop.current().add_timeout(time.time() + time_in_round - mins_to_half_hr, resetRound)
|
254 | 255 | tornado.ioloop.IOLoop.current().start()
|
0 commit comments