Skip to content

Instantly share code, notes, and snippets.

View bennyflint's full-sized avatar

Benjamin Flint bennyflint

  • Electronic Arts, Inc.
  • Seattle, WA
View GitHub Profile
@bennyflint
bennyflint / KataPotter.groovy
Created May 27, 2011 21:38
KataPotter in Groovy
import org.junit.Test
class KataPotter {
static float price = 8.0
static Map discounts = [0:0.0, 1:1.0, 2:0.95, 3:0.90, 4:0.80, 5:0.75]
def calculateOrderTotal = { Map order ->
int numberOfBookSets = order.collect { it.value }.max();