lib/triviacrack/game.rb in triviacrack-0.6.0 vs lib/triviacrack/game.rb in triviacrack-0.7.0

- old
+ new

@@ -1,11 +1,12 @@ +# frozen_string_literal: true + # Public: An object representing a Trivia Crack Game, including information # about the questions to be asked in the game, the state of the game, opponent # information, and more. module TriviaCrack class Game - # Public: The unique identifier of the game. attr_reader :id # Public: The TriviaCrack::User information for the opponent. attr_reader :opponent @@ -56,11 +57,11 @@ attr_reader :my_statistics # Public: TriviaCrack::GameStatistics for the opponent. attr_reader :opponent_statistics - def initialize(id:, opponent: nil, game_status: nil, language: nil, + def initialize(id:, opponent: nil, game_status: nil, language: nil, # rubocop:disable Metrics/MethodLength, Metrics/ParameterLists created: nil, last_turn: nil, type: nil, expiration_date: nil, my_turn: nil, round_number: nil, is_random: nil, unread_messages: nil, status_version: nil, available_crowns: nil, questions: nil, my_statistics: nil, opponent_statistics: nil) @@ -93,8 +94,7 @@ # # Returns a boolean indicating if the game is playable. def playable? @my_turn && @game_status != :ended end - end end