cookietouch

CookieTouch API Documentation

Summary | Single page summary


Table of Contents

Gather

All functions related to gathering.

resourcesIds can be found in resources.txt.

canGather(...resourcesIds: string)

Check if it is possible to gather the resource(s) chosen in parameter.

Returns true if the map contains the searched resources, otherwise returns false.

Example:

canGather([1, 28]) // True if it is possible to collect Ash and/or If on this map.

yield*gather(...resourcesIds: string)

Gathers the resources passed in parameter after having checked whether it was possible to.

Returns true and collects resources if the map contains the searched resources, otherwise returns false.

Example:

yield* gather([1, 28]) // Gather Ash and/or If if they are present on the map.