BotHub - BotHub is a web-based robot editor built in go with support for go and python

Robot Simulator

This is an application to simulate toy robot moving on a square tabletop, 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.

Table of Contents

Preparations

Install Golang

Please Follow the instruction here

Set Up ENV

Make sure $GOPATH environment variable are correctly setup

#this should be your workspace for all the go packages (result will be different from yours)
$ echo $GOPATH
$ /Users/macuser/Documents/gowork

Some comments start with !, TODO, *, and other such symbols. The better comments VSCode extension can help the developer experience by coloring those comments in special ways.

GO version

At the time of writing, we are using 1.7.4 . to check your version

$ go version
$ go version go1.7.4 darwin/amd64

Working Directory

Ensure the structure of your working directory is $GOPATH/src/robot-simulator/., copy or clone all the source code inside this working directory.

Running tests

$ go test -v -cover ./...

Compiling Or Running the Application

This program has been pre-compiled and the executable is called main in the working folder.

Compiling

To Compile the code first make sure you are in the working director

$ pwd
$ /Users/macuser/Document/gowork/src/robot-simulator

Then download all dependencies

$ go get -t -v ./...

Then compile the code, which will create an executable under $GOPATH/bin/robot-simulator

$ go build *.go

Running

You can run the application from the executable file in the working directory

$ /Users/macuser/Document/gowork/robot-simulator/main

Alternatively you can also compile and run the code from your working directory

$ go run main.go

With Table Width and Length Option

You are able to change the width and length of the table before starting the program by providing it using flag -width and -length like below.

$ ./main -width=10 -length=10

With File Commands Option

You are also able to feed commands using flat file in your working directory by providing the filename before starting the program by using flag -f like below

$ ./main -f=test-data.Text

Help Option

Help is available on how to use the flag options by using -h like below

$ ./main -h

Commands

Below are available commands to simulate the robot:

PLACE X,Y,F will put the toy robot on the table in position X,Y,F.

MOVE will move the toy robot one unit forward in the direction it is currently facing.

LEFT will rotate the robot 90 degrees to the left from the robot direction without changing the position of the robot.

RIGHT will rotate the robot 90 degrees to the right from the robot direction without changing the position of the robot.

REPORT will announce the X,Y and F of the robot. This will print out X,Y,F of the current state of the robot.

Similar Resources

MIME mail encoding and decoding package for Go

enmime enmime is a MIME encoding and decoding library for Go, focused on generating and parsing MIME encoded emails. It is being developed in tandem w

Nov 30, 2022

A simple Go POP3 client library for connecting and reading mails from POP3 servers.

go-pop3 A simple Go POP3 client library for connecting and reading mails from POP3 servers. This is a full rewrite of TheCreeper/go-pop3 with bug fixe

Dec 17, 2022

a simple api that sent spam via sms and email

a simple api that sent spam via sms and email routes: /sms /email example request with python

Oct 19, 2021

Monitoring and automation for Open Source email servers, starting with Postfix.

Monitoring and automation for Open Source email servers, starting with Postfix.

Welcome to Lightmeter Control Center, the Open Source mailops monitoring application.

Dec 19, 2022

A simple microservice designed in Go using Echo Microframework for sending emails and/or calendar invitations to users.

Calenvite A simple microservice designed in GO using Echo Microframework for sending emails and/or calendar invitations to users. Features Send emails

Oct 29, 2022

Filtering spam in mail server, protecting both client privacy and server algorithm

HE Spamfilter SNUCSE 2021 "Intelligent Computing System Design Project" Hyesun Kwak Myeonghwan Ahn Dongwon Lee abstract Naïve Bayesian spam filtering

Mar 23, 2022

Email-searcher - Given a domain name and real name, attempt to find an existing email for that user.

email-searcher Given a domain name and real name, attempt to find an existing email for that user. Using Run it with both the domain and name flags, l

Jan 2, 2022

Hxgomail - Gomail - a simple and efficient package to send emails

Gomail Introduction Gomail is a simple and efficient package to send emails. It

Jan 4, 2022

Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ

Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ

Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ

Oct 27, 2022
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.

Go Simple Mail The best way to send emails in Go with SMTP Keep Alive and Timeout for Connect and Send. IMPORTANT Examples in this README are for v2.2

Jan 8, 2023
📮 Simple (but useful) email sender written in pure Go v1.17. Support HTML templates and attachments.

?? Go Email Sender Simple (but useful) email sender written in pure Go v1.17. Yes, yet another email package here! ?? Support HTML templates and attac

Dec 31, 2021
Disposable webmail server (similar to Mailinator) with built in SMTP, POP3, RESTful servers; no DB required.
Disposable webmail server (similar to Mailinator) with built in SMTP, POP3, RESTful servers; no DB required.

Disposable webmail server (similar to Mailinator) with built in SMTP, POP3, RESTful servers; no DB required.

Jan 1, 2023
Deploy your own temporary email service with web interface under 15 minutes.

watt Watt is an open-source smtp wrapper written in Go that provides a simple web interface for creating and managing temporary email addresses. It is

May 7, 2023
A simple CSS parser and inliner in Go

douceur A simple CSS parser and inliner in Golang. Parser is vaguely inspired by CSS Syntax Module Level 3 and corresponding JS parser. Inliner only p

Dec 12, 2022
Robust and flexible email library for Go

email Robust and flexible email library for Go Email for humans The email package is designed to be simple to use, but flexible enough so as not to be

Dec 30, 2022
:inbox_tray: An IMAP library for clients and servers

go-imap An IMAP4rev1 library written in Go. It can be used to build a client and/or a server. Usage Client package main import ( "log" "github.com

Jan 6, 2023
:envelope: A streaming Go library for the Internet Message Format and mail messages

go-message A Go library for the Internet Message Format. It implements: RFC 5322: Internet Message Format RFC 2045, RFC 2046 and RFC 2047: Multipurpos

Dec 26, 2022
Using Mailchain, blockchain users can now send and receive rich-media HTML messages with attachments via a blockchain address.

Mailchain Introduction Mailchain enables blockchain-based email-like messaging with plain or rich text and attachment capabilities. Using blockchain p

Dec 28, 2022
High performance, self-hosted newsletter and mailing list manager with a modern dashboard. Single binary app.
High performance, self-hosted newsletter and mailing list manager with a modern dashboard. Single binary app.

listmonk is a standalone, self-hosted, newsletter and mailing list manager. It is fast, feature-rich, and packed into a single binary. It uses a Postg

Dec 30, 2022