nadavc / groovykoans

A collection of small exercises in the form of unit tests, designed to get Java developers up to speed on Groovy
http://nadavc.github.com/groovykoans
Do What The F*ck You Want To Public License
264 stars 145 forks source link

Koan08.test03_MultiAssignment() #27

Closed guncoder closed 9 years ago

guncoder commented 10 years ago

Solution is wrong, it misses 10 as nextInt(n) is not inclusive. Should be maxInt+1 // ------------ START EDITING HERE ---------------------- def random = new Random() [random.nextInt(maxInt+1), random.nextInt(maxInt+1)] // ------------ STOP EDITING HERE ----------------------