Git Product home page Git Product logo

triangule's Introduction

NOME: STUDENT_NUMBER:

CODE DESCRIPTION:

This project is a robot simulator. The robots are Triangules, and they have some shared methods that is encapsulated on the Triangule.java class.

Every robot class should inherits from the Triangule class. This class has the general methods that should be available and could be used by the robot's class, such display(), hasReachedMaxWidth(), and so fourth. It is an abstract class, it means it has some abstract methods that should be implemented when inherit from it. Those methods are signatures only, it means every concrete class should implement them according to its behavior.

In this attchment, we also have the RandomWalk.java class, that implements the Triangule class. The RandomWalk class is a robot factory that makes the robot to move randomly on the background area. Its movements are controlled by the generateRandom() method, that tells out of all the movements, which one should behave like in the iteration. The available moves are: do nothing; turn right, turn left, walk vertically, walk horizontally, walk forwards or walk backwards.

We also have in it the Patroller.java class, that is a robot implementation of a patroller. Its movements behaves in the way the robot should look for the border and run around the background window, and drop a circle on every corner.

Finally, we have a runner.java class that instantiates the classes and makes it run by calling its interface methods.

HOW TO COMPILE/RUN:

Open the Processing program, create a window for each class here described, and then run the runner.java class. You will have the project running, and you can edit the params on the objects instantiating.

triangule's People

Contributors

maychell avatar

Watchers

James Cloos avatar  avatar

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.