Catalogo sport in YAML, board implicito, engine per volley/basket/timed/racket/timer/generic, regia e app Android allineate. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
346 B
Ruby
16 lines
346 B
Ruby
module Scoring
|
|
class ApplyAction
|
|
Result = Struct.new(:score, :set_won, :match_won, :winner, keyword_init: true)
|
|
|
|
def initialize(session:, action:)
|
|
@session = session
|
|
@match = session.match
|
|
@action = action.to_s
|
|
end
|
|
|
|
def call
|
|
Engine.for(@match).apply(session: @session, action: @action)
|
|
end
|
|
end
|
|
end
|