BattleSim/client/app/js/collections/battles/battle_collection.coffee

9 lines
194 B
CoffeeScript
Raw Normal View History

2016-02-01 22:19:30 +00:00
class @BattleCollection extends Backbone.Collection
model: Battle
isPlaying: ->
@find((battle) -> battle.isPlaying())?
playingBattles: ->
@filter((battle) -> battle.isPlaying())