var hardnessAscending = require('./sort.js').hardnessAscending
var copy = require('../copy.js')

module.exports = function (stack, count, key) {
	// Calling this function with (stack, key) should be the same as calling it with (stack, 1, key)
	if (typeof count === 'string') {
		key = count
		count = 1
	}
	// count should be optional, and default to 1
	if (typeof count === 'undefined') {
		count = 1
	}
	// key should default to all of the keys
	if (typeof key === 'undefined') {
		key = 'all'
	}

	// sorted has all of the cards sorted easiest to hardest
	var sorted = copy(stack).sort(hardnessAscending)

	if (count === 1) {
		if (key === 'all') {
			return sorted[0]
		}
		else {
			return sorted[0][key]
		}
	}

	// Only keep the number of cards specified by count in limited
	var limited = sorted.slice(0, count)
	if (key === 'all') {
		return limited
	}
	else {
		return limited.map(function (card) {
			return card[key]
		})
	}
}

@@ -62,18 +62,21 @@
 g%0Avar co
-py
+nvert
  = requi
@@ -88,13 +88,13 @@
 ./co
-py.js
+nvert
 ')%0A%0A
@@ -137,19 +137,283 @@
 unt, key
-) %7B
+, reverse) %7B%0A%09if (typeof reverse === 'undefined') %7B%0A%09%09reverse = false // By default, just sort easiest to hardest and do not reverse the order%0A%09%09// But if reverse is set to true, the order will be reversed (thus this function will be for getting the hardest card)%0A%09%7D%0A
 %0A%09// Cal
@@ -838,16 +838,27 @@
 = co
-py
+nvert
 (stack
+, 'nice'
 ).so
@@ -878,16 +878,63 @@
 cending)
+%0A%09if (reverse) %7B%0A%09%09sorted = sorted.reverse()%0A%09%7D
 %0A%0A%09if (c

Make f.easiest() use f.convert() and allow reverse