Giter VIP home page Giter VIP logo

robot-maze's Introduction

Robot Maze

robot-maze is a JavaFX application that simulates a robot navigating through a maze. The application loads a maze and a robot image, and the user can control the robot's movement through the maze using keyboard arrow keys. The robot cannot pass through the walls of the maze, and its movement is restricted to valid paths only.

Features

  • Maze and Robot visualization using JavaFX.
  • Keyboard controls to navigate the robot through the maze.
  • Collision detection to prevent the robot from passing through the maze walls.
  • Ability to reset the robot to its initial position.

Getting Started

Prerequisites

  • Java 8 or later.
  • JavaFX SDK.

Running the Application

  1. Clone the repository:

    git clone https://github.com/MatthewDeSouza/robot-maze.git
  2. Navigate to the project directory:

    cd robot-maze
  3. Compile and run the application:

    javac -cp path-to-javafx-sdk/lib/* --add-modules javafx.controls,javafx.fxml -d out src/com/github/matthewdesouza/robotmaze/*.java
    java -cp out:path-to-javafx-sdk/lib/* --add-modules javafx.controls,javafx.fxml com.github.matthewdesouza.robotmaze.Main

    Replace path-to-javafx-sdk with the path to your JavaFX SDK.

Usage

  • Use the arrow keys or W, A, S, D keys to move the robot up, left, down, and right respectively.
  • Press R to reset the robot to its initial position.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • JavaFX for providing the graphical framework used in this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.