# MultiStairHandler

## data MultiStairHandler

A handler dealing with multiple staircases, simultaneously.

Note that, at the moment, using the MultiStairHandler requires the jsQuest.js library to be loaded as a resource, at the start of the experiment.

## Constructor

#### new MultiStairHandler(options)

Source:
  - data/MultiStairHandler.js, line 26

##### Parameters:

Name | Type | Description
--- | --- | ---

`options`

Object

the handler options

###### Properties

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`psychoJS` | module:core.PsychoJS |  |  | the PsychoJS instance
`varName` | string |  |  | the name of the variable / intensity / contrast / threshold manipulated by the staircases
`stairType` | MultiStairHandler.StaircaseType | <optional> | `"simple"` | the handler type
`conditions` | Array.<Object> | String | <optional> | `[undefined]` | if it is a string, we treat it as the name of a conditions resource
`method` | module:data.TrialHandler.Method |  |  | the trial method
`nTrials` | number | <optional> | `50` | maximum number of trials
`randomSeed` | number |  |  | seed for the random number generator
`name` | string |  |  | name of the handler
`autoLog` | boolean | <optional> | `false` | whether or not to log

### Extends

- TrialHandler

### Members

#### (static, readonly) StaircaseStatus :Symbol

Source:
  - data/MultiStairHandler.js, line 425

##### Properties:

Name | Type | Description
--- | --- | ---
`RUNNING` | Symbol | The staircase is currently running.
`FINISHED` | Symbol | The staircase is now finished.

Staircase status.

##### Type:

- Symbol

#### (static, readonly) StaircaseType :Symbol

Source:
  - data/MultiStairHandler.js, line 407

##### Properties:

Name | Type | Description
--- | --- | ---
`SIMPLE` | Symbol | Simple staircase handler.
`QUEST` | Symbol | QUEST handler.

MultiStairHandler staircase type.

##### Type:

- Symbol

#### currentStaircase

Source:
  - data/MultiStairHandler.js, line 93

Get the current staircase.

#### intensity

Source:
  - data/MultiStairHandler.js, line 103

Get the current intensity.

### Methods

#### (protected) _nextTrial()

Source:
  - data/MultiStairHandler.js, line 268

Move onto the next trial.

#### (protected) _prepareStaircases()

Source:
  - data/MultiStairHandler.js, line 211

Setup the staircases, according to the conditions.

#### (protected) _validateConditions()

Source:
  - data/MultiStairHandler.js, line 155

Validate the conditions.

#### addResponse()

Source:
  - data/MultiStairHandler.js, line 126

Add a response to the current staircase.