Git Product home page Git Product logo

Comments (2)

Abstrct avatar Abstrct commented on September 18, 2024

ef8a31f

So I gave this a go I think you will still be happy with the results. Admittedly, I had to make a couple changes from your original idea due to some added functionality but hopefully you agree with the changes. You now have the following options:

MOVE(ship, speed, x, y); -- automatically calculates direction. must have enough fuel still to stop
MOVE(ship, x, y); -- automatically calculates direction and best possible speed
MOVE(ship, speed, direction, x, y) -- Still works as before

I was not able to create the MOVE(ship, speed, direction) overload because the same parameters were already taken by MOVE(ship, x, y). I think MOVE(ship, X,Y), which will calculate both direction and optimal speed for you, will be a lot more popular of a command so I gave it the easier overload.

I also haven't moved any code to the other functions. I didn't write most of MOVE so I don't feel like changing other segments around. I will leave that to the MOVE expert (tigereye). Right now all the overloads just pass all the details to the main MOVE function.

Thanks again for your suggestion! If you don't agree with the way I implemented them I am certainly open to any constructive criticism you may have.
-Abstrct

from schemaverse.

AkiTensai avatar AkiTensai commented on September 18, 2024

Excellent work. I kept looking at the page threateningly, but my own projects yelled at me louder. Thank you Abstrct.

from schemaverse.

Related Issues (20)

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.