You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.4 KiB
43 lines
1.4 KiB
extends Reference
|
|
class_name MajorityJudgmentAbstractJudgmentsProvider
|
|
#class_name MajorityJudgmentAbstractProvider # perhaps this? (short = sweet)
|
|
|
|
|
|
# Abstract class for (Judgment) Providers
|
|
# The job of the children is to emit the judgment_emitted signal.
|
|
#
|
|
# Example providers (ideas):
|
|
# - Test/Demo providers
|
|
# - Twitch chat commands (like "A3B2C0")
|
|
# - Youtube Live chat commands (if possible)
|
|
# - IRC chat commands (low, as a bot would be better)
|
|
# - Discord, somehow
|
|
# - Riot, Jami, etc.
|
|
# - Heck, any videoconferencing software with a workable API
|
|
#
|
|
# So far, providers don't care about whether the candidate or grade indices
|
|
# are within correct range ; that work will be done by the listener to the
|
|
# "judgment_emitted" event, and it will do its best, and ignore bad data.
|
|
#
|
|
# See MajorityJudgmentLinearResultsControl.gd, that's where a (the) listener is.
|
|
|
|
|
|
signal judgment_emitted(
|
|
author_identifier, # String, unique per author (aka participant)
|
|
grade_index, # int (0 == REJECT, up to the grading size minus one)
|
|
candidate_index # int, position in the original array of candidates
|
|
)
|
|
|
|
|
|
# Called by the scene managing the poll's lifecycle.
|
|
# See MajorityJudgmentLinearResultsControl.gd
|
|
# Meant to be overridden (put your logic here instead of _init)
|
|
func start_providing():
|
|
pass
|
|
|
|
|
|
# Meant to be overridden.
|
|
# In here you can stop your timers, close your network connections, etc.
|
|
func stop_providing():
|
|
pass
|