Skip to main content
ActiveJavaTDDSpringGradle

Mars Rover Kata

Training kata to develop a remotely controlled Mars rover using TDD.

A training kata to develop an API that translates commands sent from Earth into instructions understood by a rover on Mars.

Description

You're part of the team exploring Mars by sending remotely controlled vehicles to the planet's surface. Your task is to develop an API that allows controlling the rover via commands.

Requirements

  • The rover has an initial position (x,y) and a direction (N,S,E,W)

  • It receives an array of commands: FORWARD, BACKWARD, LEFT, RIGHT

  • Implement forward and backward movement

  • Implement left and right turns

  • Implement wrapping at edges (the planet is a sphere)

  • Detect obstacles before each movement

  • If an obstacle is found, the rover stops and reports its position

Technical Details

  • Requirement: Java 21

  • Build Tool: Gradle

  • Includes: Implemented solution and Spring service

Development Rules

  • Hardcore TDD: No excuses

  • Switch roles (driver, navigator) after each TDD cycle

  • No red phases during refactoring

  • Careful with edge cases and exceptions

Technologies

  • Java 21

  • Gradle

  • Spring Framework

  • JUnit 5

Learning Objectives

  • Practice Test-Driven Development

  • API design

  • Coordinate and direction handling

  • Collision detection

  • Pair programming

Links

Statistics

Last commit
2023-12-15

Tech Stack

JavaTDDSpringGradle