Skip to content

kadri-k/mars_rover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mars_rover project

Introduction

The Mars Rover project is a Java based program that simulates how robotic rovers move across a plateau on Mars. The rovers can turn left or right and move forward according to a series of commands. This project follows OOP principles and includes thorough testing to ensure everything works properly.

Table of Contents

Features

  • Simulates rover movement on a grid-like plateau.
  • Accepts instructions for the rover to move forward and turn left or right.
  • Ensures rovers stay within the plateau boundaries.
  • Includes tests to check that the program behaves correctly.

Getting started

To run this project, you need to have the following installed ->

  • Java Development Kit (JDK) 21
  • Maven installed on your machine

Installation

Clone the repository: ''' bash git clone https://github.com/kadri-k/mars_rover.git cd mars-rover

Build the project using Maven

''' bash mvn clean install

How to run UI

  1. Compile the project using Maven: mvn clean compile
  2. Run the MarsRoverUI class: mvn exec:java -Dexec.mainClass="com.yourproject.MarsRoverUI"

How to Use the Project

Modify the input in MarsRoverApp.java to match your requirements. The input format should be as follows: 5 5 # Plateau size (width and height) 1 2 N # Starting position of the rover (x-coordinate, y-coordinate, direction) LMLMLMLMM # Movement instructions for the rover 3 3 E # Starting position of another rover (optional) MMRMMRMRRM # Movement instructions for the second rover (optional)

How to Run Tests

mvn test

Contributing

  1. Fork this repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages