bitburner-src/markdown/bitburner.codingcontract.md
Olivier Gagnon feb0430aff work on doc
2021-10-30 15:46:34 -04:00

1.4 KiB
Raw Blame History

Home > bitburner > CodingContract

CodingContract interface

Coding Contact API

Signature:

interface CodingContract 

Methods

Method Description
attempt(answer, fn, host) Attempts to solve the Coding Contract with the provided solution.
attempt(answer, fn, host, opts) Attempts to solve the Coding Contract with the provided solution.
getContractType(fn, host) Returns a name describing the type of problem posed by the Coding Contract. (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)
getData(fn, host) Get the data associated with the specific Coding Contract. Note that this is not the same as the contracts description. This is just the data that the contract wants you to act on in order to solve
getDescription(fn, host) Get the full text description for the problem posed by the Coding Contract.
getNumTriesRemaining(fn, host) Get the number of tries remaining on the contract before it self-destructs.