Skip to main content

A simple project for a toy robot

Project description

PBTOYROBOT: Toy Robot CLI

A CLI to control a toy robot.

Installation

Install using pip:

pip install pbtoyrobot

CLI

  • The application is a simulation of a toy robot moving on a square tabletop, of dimensions 5 units x 5 units.
  • There are no other obstructions on the table surface.
  • The robot is free to roam around the surface of the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented, however further valid movement commands must still be allowed.
    # Show help
    pbtoyrobot --help

    # PLACE: Places the robot at X, Y with orientation F
    # Possible value for x and y are integers between 0 and 5 included
    # Possible values for F are NORTH, EAST, SOUTH and WEST
    pbtoyrobot PLACE 1,1,NORTH

    # MOVE: Moves the robot of one unit in the current direction
    pbtoyrobot MOVE

    # LEFT: Rotates the robot 90 degrees in the specified direction
    pbtoyrobot LEFT

    # RIGHT: Rotates the robot 90 degrees in the specified direction
    pbtoyrobot RIGHT

    # REPORT: will announce the X,Y and orientation of the robot
    pbtoyrobot REPORT

Usage

Example Input and Output:

PLACE 0,0,NORTH
MOVE
REPORT
Output: 0,1,NORTH
PLACE 0,0,NORTH
LEFT
REPORT
Output: 0,0,WEST
PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT
Output: 3,3,NORTH

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pbtoyrobot-1.0.10.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pbtoyrobot-1.0.10-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file pbtoyrobot-1.0.10.tar.gz.

File metadata

  • Download URL: pbtoyrobot-1.0.10.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.6

File hashes

Hashes for pbtoyrobot-1.0.10.tar.gz
Algorithm Hash digest
SHA256 84396f954ce3ccc2355cda7fcc377547504602c12a5da146677cf39cfe2f8654
MD5 ebdb6694ba79612859518508fcb8da58
BLAKE2b-256 c5bc01dbaafaa134cbef2e67df5bd365112bcdd987bc056de9d0933eb63dcc70

See more details on using hashes here.

File details

Details for the file pbtoyrobot-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: pbtoyrobot-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.6

File hashes

Hashes for pbtoyrobot-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 705c09096e3ced6b7d22bcafc6493e6b9ae6cb165e41075b4d816e3ad6da1dfb
MD5 de68e787f6a34867def8f23082c2a5e5
BLAKE2b-256 183804e061cef068bbef64834b2dba85274f4abc0c19642ebbab11b8c2c65c78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page