aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/lib/n.js
blob: 78dfb1c436c03701c515d0be584e346a4a2cca9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'use strict'

const FnMove = require('./_move')

function FnN (pico, x, y) {
  FnMove.call(this, pico, x, y)

  this.name = 'north'
  this.glyph = 'n'
  this.info = 'Moves Northward, or bangs.'

  this.haste = function () {
    if (this.signal()) { return }
    if (this.is_free(0, -1) !== true) { this.replace('b'); this.lock(); return }
    this.move(0, -1)
  }
}

module.exports = FnN