Skip to content

sirfak/robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROBOT

Simulates the movement of robot on the table of 5x5 unit by executing following commands.Ignores any command that cause robot to fall

Commands:
PLACE 3,2,NORTH
MOVE
LEFT
RIGHT
REPORT

STRUCTURE

  1. Main.java
    The main entry point for the program. it expects file name in the command line argument.By default it takes command.json as command file.

  2. CommandProcessor.java
    Implements ICommandProcessor interface and provides implementation for each valid command

  3. Executor.java It takes commanprocessor instance as argument. Reads the command file and Filters any command that is before the first place command and runs execute command

  4. Position.java
    Holds the postion of the robot

USAGE

Requires maven 3.0. command.json is default file name. File should exist in \src\main\resources forlder

mvn exec:java -D"exec.mainClass"="com.whispir.Main" -Dexec.args="command.json"

RESULT

#IntelliJ Alt text

#Maven Alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages