mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 21:25:47 +01:00
837c6bd1c2
* ns.codingcontract always returns a string (reward on success, empty on fail), simplifying usage and documentation of function. * Because of the above, return value still works when used as a boolean, as long as no direct equality comparison to true/false. * Documentation expanded and examples added. Co-authored by @quacksouls
27 lines
1.2 KiB
Markdown
27 lines
1.2 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContract](./bitburner.codingcontract.md)
|
|
|
|
## CodingContract interface
|
|
|
|
Coding Contract API
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
export interface CodingContract
|
|
```
|
|
|
|
## Methods
|
|
|
|
| Method | Description |
|
|
| --- | --- |
|
|
| [attempt(answer, filename, host)](./bitburner.codingcontract.attempt.md) | Attempts a coding contract, returning a reward string on success or empty string on failure. |
|
|
| [createDummyContract(type)](./bitburner.codingcontract.createdummycontract.md) | Generate a dummy contract. |
|
|
| [getContractType(filename, host)](./bitburner.codingcontract.getcontracttype.md) | Get the type of a coding contract. |
|
|
| [getContractTypes()](./bitburner.codingcontract.getcontracttypes.md) | List all contract types. |
|
|
| [getData(filename, host)](./bitburner.codingcontract.getdata.md) | Get the input data. |
|
|
| [getDescription(filename, host)](./bitburner.codingcontract.getdescription.md) | Get the description. |
|
|
| [getNumTriesRemaining(filename, host)](./bitburner.codingcontract.getnumtriesremaining.md) | Get the number of attempts remaining. |
|
|
|