Skip to content

srettha/maqe-bot

Repository files navigation

MAQE Bot

CircleCI Coverage Status

This is my interpretation on how to solve MAQE Bot challenge from MAQE challenge.

Overview

The goal of this bot is to return X, Y, and Direction. Walking command can only be these followings:

Command Explanation
W Walk forward to that particular direction, step must be follow by this command
L Turn left
R Turn right
RW10RW10

with the given input, what is answer of those steps?

Key Value
X X-axis
Y Y-axis
Direction North, East, South, West
{
    X: 10,
    Y: -10,
    Direction: 'South',
}

Usage

Run it as CLI with yarn

yarn-cli

Remove project from CLI

yarn global remove @thestrayed/maqebot

Run it as CLI with npm locally

  1. Clone project

  2. Install project's dependencies

    yarn
  3. Build project

    yarn build
  4. Install to npm global locally

npm-cli

Development

  1. Start the CLI

    yarn dev
  2. Build project

    yarn build

Test

  1. Running follow command to execute test

    yarn test

References