Skip to content

Documentation

Allen Jiang edited this page Jan 9, 2016 · 6 revisions

###Table of Contents

 

License

This software falls under the Creative-Commons Attribution Share-Alike 4.0 International License (cc-by-sa). Share it, edit, use it, credit.

Standards and Conventions

Standards are adapted from CS61B-style

The file MUST end with a newline.

Naming

Since there is no package schema in ASH scripts, all names of elements of this library should start with the prefix utils_mining_. All suffix names follow the programming lowerCamelCase naming convention. Parameter names, function names, and field names must be descriptive. (Please, no cultural references).

Usage

This script is usable from the graphical CLI. The command must conform to the form:

minevolcano [turns]

Parameters:

  • turns is a non-optional parameter that specifies the number of adventures to spend.

Internal Documentation

Major sections should be marked with /** two-asterisk **/ level comments and minor sections should be marked with /** three-asterisk ***/ level comments.

All functions and fields should be fully described with //doubleslash commentary. If expensive, runtime and space bounds should be provided.

Structure

Helper functions should appear before their children. They should have their own utility and be fully documented.

Fields and functions should appear in the file as closely as possible to the order they appear here.

Appropriate indentation with a buffer size of four spaces should be applied. All separate elements should be separated with blank lines.

 

Usage

In the Graphical CLI, run the command minevolcano X where X is the number of turns you want to spend.

Example

The following code spends 153 turns mining the Gold mine.

> minevolcano 153

 


Want to contribute to this project?

Fork, add documented changes on a new branch, test, merge, and create a pull request.

Clone this wiki locally