Skip to content

darksharkmark/ToyRobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToyRobot

The application is a simulation of a toy robot moving on a square table top, of dimensions 5 units x 5 units. gtest

Dependencies

Building the Application

  • Visual Studio 2019, run ToyRobot Project

Usage

  • Input is processed via command line in order e.g.
    • ./ToyRobot.exe PLACE 0,0,NORTH
    • ./ToyRobot.exe PLACE 3,4,EAST MOVE REPORT

Tests

  • using Gtest Framework
  • There is a specific Post Build step in the Main project to build the executable as a library, then we can link that library against our Test project
    • ToyRobot Project > Properties > Configuration Properties > Build Events > Post Build Event > Command Line
      • lib /NOLOGO /OUT:"$(OutDir)$(TargetName).lib"

Coding Methodolgies

  • Early Return pattern
    • validate input as early as possible to avoid wasted compute
    • since input is validated early, we can assume clean data later on
  • Focusing on code readability over effeciency
  • makes use of the std library where appropriate

Improvements

  • State can stored as a file or other means if necesarry

Known Issues

  • Some tests are failing, I have left them in as talking points about the program

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages