MCPcopy Create free account

hub / github.com/abrenaut/posio / functions

Functions43 in github.com/abrenaut/posio

↓ 3 callersFunctioncreateGeoJSONLayer
(color)
game/static/game/js/game.js:28
↓ 3 callersFunctionisQuestionInProgress
()
game/static/game/js/game.js:90
↓ 3 callersFunctionupdateGeoJSONLayerFromInput
(layer, layerDataInputName)
game/static/game/js/game.js:53
↓ 2 callersFunctionisMobileViewport
()
game/static/game/js/game.js:19
↓ 2 callersFunctionupdateGeoJSONLayer
(layer, layerData)
game/static/game/js/game.js:70
↓ 1 callersFunctionanimatePlayerScoreValue
(playerScoreValueElement)
game/static/game/js/game.js:102
↓ 1 callersFunctionanimateProgressBar
()
game/static/game/js/game.js:78
↓ 1 callersFunctioncalculate_score
Calculate how close the user's answer is to the correct answer and return the distance and the score. The score is based on the distance
game/services.py:39
↓ 1 callersFunctioncreate_game_instance
Create a new game instance for the given game.
game/services.py:98
↓ 1 callersFunctionend_current_turn
End the current turn for the given game instance.
game/services.py:124
↓ 1 callersFunctionget_leaderboard
Return the current leaderboard with the total score for each player and the score for the question passed as an argument.
game/services.py:131
↓ 1 callersFunctionget_serialized_question_answers
Get a question's answers and serialize them so they can't be sent to websocket consumers.
game/services.py:171
↓ 1 callersFunctionmain
Run administrative tasks.
manage.py:7
↓ 1 callersFunctionstart_new_turn
Start a new turn for the given game instance with a new question.
game/services.py:108
Method__str__
(self)
game/models.py:24
Method__str__
(self)
game/models.py:35
Method__str__
(self)
game/models.py:49
Method__str__
(self)
game/models.py:68
Methodconnect
(self)
game/consumers.py:24
Functioncreate_answer
Update a user answer for the current game instance question.
game/services.py:68
Functioncreate_player
Create a new player with the given username and session key.
game/services.py:25
Methoddisconnect
(self, close_code)
game/consumers.py:38
Functionformat_leaderboard
Shorten a leaderboard to only show the player's position and the top N players. Replace the player's username with "You" and highlight th
game/services.py:200
Functiongame
(request, game_slug)
game/views.py:42
Methodgame_answer
(self, event)
game/consumers.py:77
Functiongame_loop
Main game loop that sends questions to the players and sends the updated leaderboard after each question.
game/services.py:246
Methodgame_new_question
(self, event)
game/consumers.py:64
Functionget_player
Get the player for the given session key.
game/services.py:54
Methodhandle
(self, *args, **options)
game/management/commands/createcitiesgame.py:12
Methodhandle
(self, *args, **options)
game/management/commands/startgameloops.py:10
Methodhandle
(self, *args, **options)
game/management/commands/createflagsgame.py:13
Functionindex
Show the first game page with the player creation form always visible.
game/views.py:7
Functionplayer
(request: HttpRequest)
game/views.py:31
Methodreceive
Receive message from WebSocket. The only message we expect from the client is the user's answer to the question.
game/consumers.py:41
Functionrun
()
game/static/game/js/game.js:110
MethodsetUp
(self)
game/tests/test_services/test_get_leaderboard.py:9
MethodsetUp
(self)
game/tests/test_services/test_create_answer.py:12
MethodsetUp
(self)
game/tests/test_services/test_calculate_score.py:9
Methodtest_create_answer
(self)
game/tests/test_services/test_create_answer.py:28
Methodtest_create_answer_after_turn_finished
(self)
game/tests/test_services/test_create_answer.py:69
Methodtest_end_current_turn
(self)
game/tests/test_services/test_get_leaderboard.py:41
Methodtest_score_for_city_question
(self)
game/tests/test_services/test_format_leaderboard_for_user.py:11
Methodtest_score_for_city_question
(self)
game/tests/test_services/test_calculate_score.py:12