elven-fire / StoreManager

An Elven Fire utility to simplify town usage by automatically generating and maintaining the stores and universities.
0 stars 0 forks source link

CLI: Handle purchasing one of a set of identical items #3

Open sarinilla opened 3 years ago

sarinilla commented 3 years ago

If you have two identical items in the same store (say, a DX+2 Dirk), there is currently no way to buy only one of them. We might want to add a --price you can use to differentiate? And/or maybe some logic that if you are trying to buy one and there are multiple results that are identical that it will just purchase the lower-priced of them?

ricegf commented 3 years ago

When I teach text interfaces, we add an int identifier to each item (which by an astounding coincidence is its index into the container). This allows quick and unambiguous identification of a specific item. But I also can't imagine where "the lowest price of an identical item" wouldn't be the intended one.