Jelajahi Sumber

Update ResourceSet.h

Use a more descriptive method name and add comment of what it does.
Xilmi 1 tahun lalu
induk
melakukan
79531c8596
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      lib/ResourceSet.h

+ 2 - 1
lib/ResourceSet.h

@@ -148,7 +148,8 @@ public:
 		return ret;
 	}
 
-	int div(const ResourceSet& income) {
+	//Returns how many items of "this" we can afford with provided income
+	int maxPurchasableCount(const ResourceSet& income) {
 		int ret = 0; // Initialize to 0 because we want the maximum number of accumulations
 
 		for (size_t i = 0; i < container.size(); ++i) {