fixed exception for games without fellows

This commit is contained in:
danijoo
2014-01-05 15:31:01 +01:00
parent f526accb8b
commit bc1a75d53a
2 changed files with 4 additions and 2 deletions

View File

@@ -37,9 +37,11 @@ class HistoryGame
@createDate=data['createDate']
@createDateString=data['createDateString']
@fellowPlayers=[]
if(data.has_key? "fellowPlayers")
data['fellowPlayers'].each do |player|
@fellowPlayers << Player.new(player)
end
end
@gameId=data['gameId']
@gameMode=data['gameMode']
@gameType=data['gameType']