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.
|
module GamesHelper
|
|
|
|
def game_final_score myshixun, game
|
|
if myshixun.shixun.status <= 1 || (game.final_score != 0 && game.answer_open?)
|
|
gold = 0
|
|
else
|
|
if game.answer_open? && game.final_score ==0
|
|
gold = -game.challenge.try(:score).to_i
|
|
else
|
|
gold = game.final_score.to_i
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|