buy

static boolean buy(Shop.Quantity quantity, Array<int> id)

Attempts to buy the specified quantity of the first item whose id matches the specified id

Return

true if the click to buy the item was successful, false otherwise

Parameters

quantity

the quantity to buy

id

the item id to buy

static boolean buy(Shop.Quantity quantity, Array<String> name)

Attempts to buy the specified quantity of the first item whose name equals one of the specified names

Return

true if the click to buy the item was successful, false otherwise

Parameters

quantity

the quantity to buy

name

the item name to buy

static boolean buy(Shop.Quantity quantity, Predicate<Item> filter)

Attempts to buy the specified quantity of the first item which matches the specified predicate

Return

true if the click to buy the item was successful, false otherwise

Parameters

quantity

the quantity to buy

filter

the item filter