Skip to content

Instantly share code, notes, and snippets.

@Noxville
Created August 31, 2015 10:26
Show Gist options
  • Save Noxville/87d4707b9b6cf589c811 to your computer and use it in GitHub Desktop.
Save Noxville/87d4707b9b6cf589c811 to your computer and use it in GitHub Desktop.
Team Filter
def oneMonthAgo = new Date(System.currentTimeMillis() - 1L * 30 * 24 * 60 * 60 * 1000)
def teams = Team.list()
.findAll { ((it.lastPlayed > oneMonthAgo) && (((it.wins + it.loses) > 50) || (it.rating > 1200))) }
.sort { -it.rating }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment