9 lines
194 B
CoffeeScript
9 lines
194 B
CoffeeScript
|
class @BattleCollection extends Backbone.Collection
|
||
|
model: Battle
|
||
|
|
||
|
isPlaying: ->
|
||
|
@find((battle) -> battle.isPlaying())?
|
||
|
|
||
|
playingBattles: ->
|
||
|
@filter((battle) -> battle.isPlaying())
|