Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 3.58 KB

README_EN.md

File metadata and controls

79 lines (62 loc) · 3.58 KB
last-commit time-with-code sonar-code-lines sonar-quality-gate-status ci

📖 Description


There is a square field of n × n cells. In the center of this field there is a square mountain of m × m cells, and in the lower left corner there is a square tractor of k × k cells, which can move along the field.

⛓ Conditions


  1. Sizes: fields — n, mountains — m and tractor — k, are entered from the keyboard;
  2. The tractor moves an arbitrary number of cells up, down, left or right; If it is not possible to move the tractor (for example, if the path abuts against a hill), then leave the tractor in place. The field is considered to be closed in a ring, that is, when the tractor leaves the left border of the field, it appears on the right, and so on;
  3. Display the current coordinates of the lower left corner of the tractor.

❗ Requirements


  • JDK: 18 and higher;

📋 Instructions for starting


All commands are executed in the console.

  1. Create a folder: mkdir GitProjects;
  2. Go to the folder: cd GitProjects;
  3. Cloning a repository: git clone https://github.com/HogwartsSchoolOfMagic/TractorMoving.git;
  4. Go to the folder: cd TractorMoving;
  5. Build project: mvn clean install;
  6. After completing 5 points — a folder with the name “target” will be created. We go into it: go target;
  7. Inside there will be a JAR file named “tractor-1.0.0.jar”. We execute the command: java -jar tractor-1.0.0.jar;
  8. Console application will start (see: Application interface).
public class TractorApplication {
  
   public static void main(String[] args) { // Used to launch the application.
      run();
   }
   
   // ... other methods
}

💻 Application interface


console-interface

🎫 License


Apache License Version 2.0

Copyright ©2022, Vladislav [SmithyVL] Kuznetsov