Giter VIP home page Giter VIP logo

Comments (3)

HexDecimal avatar HexDecimal commented on September 6, 2024

I agree that this could be better, but it's not clear if the data should be preprocessed by a function or if a new class should be made to encapsulate the data.

Did you have any code examples on your own project or is this just speculation so far?

from tcod_tutorial_v2.

DataBeaver avatar DataBeaver commented on September 6, 2024

I haven't actually written any code based on the tutorial; this is just based on my thoughts from reading it. In the simplest case the data is entered into the source code already in the correct format. To reduce the risk of human error, I think it would make sense to create a class to hold the configuration data and sort it in the constructor (or after loading it from a file or whatever way it is that the data gets into the class).

I could do a quick fork and create a pull request if you think that would be useful.

from tcod_tutorial_v2.

HexDecimal avatar HexDecimal commented on September 6, 2024

I'm not sure. If you want to do a pull request then make sure you start from the part-12 branch.

Ideally a new solution should be more readable then the current one. The performance for this section is not critical so I don't think the redundant calls to get_max_value_for_floor are a problem unless they affect readability.

from tcod_tutorial_v2.

Related Issues (17)

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.