Git Product home page Git Product logo

Comments (8)

maackle avatar maackle commented on June 12, 2024

I think this is inevitable, since you are managing ports yourself rather than using the ones tryorama provides and injects as ConfigSeedArgs. But do you see a way to integrate this more tightly with tryorama?

from tryorama.

pospi avatar pospi commented on June 12, 2024

from tryorama.

maackle avatar maackle commented on June 12, 2024

Hmm yeah you're right it's not ideal to have to manage on your own. If you want to propose a pattern we can see if we can bake it in.

Actually though, why do you have to manage the ports on your own, rather than using the random ports tryorama provides?

Would it be enough for there to be a config getter on the Player so you can read out the config data at test time?

from tryorama.

pospi avatar pospi commented on June 12, 2024

from tryorama.

maackle avatar maackle commented on June 12, 2024

The interfacePort happens to be stored "privately" at player._instancePort, which you can access already. I agree that this, and other config, would be good to have as part of the stable API, and have it documented, but this may work for you for now.

see

_interfacePort: number

from tryorama.

pospi avatar pospi commented on June 12, 2024

@maackle this does work! I think that variable may have been kept in a closure previously, hence my workarounds. This is definitely cleaner (see ref'd PR above).

So, I think the original request here is probably no longer needed- does it make sense for you to repurpose this issue as a feature request for access to the interface port for each player?

from tryorama.

maackle avatar maackle commented on June 12, 2024

@pospi that makes sense!

from tryorama.

maackle avatar maackle commented on June 12, 2024

I created a fresh issue #28 just to make the intention clearer, and it links to this one for context.

from tryorama.

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.