Coder Social home page Coder Social logo

Comments (7)

andymarden avatar andymarden commented on September 4, 2024 1

Is this when you receive an invite to a game specifically for you or in the list of open games that you can choose to accept? I imagine that it would be useful in both.

from online-go.com.

teya333 avatar teya333 commented on September 4, 2024

Yes.
I was assuming the list of open games, but It seems to use both.

from online-go.com.

andymarden avatar andymarden commented on September 4, 2024

Ok - let me take a look at this

from online-go.com.

JoshuaNascimento avatar JoshuaNascimento commented on September 4, 2024

Hey, wanted to take a crack at this.

If I'm correct, handicap is simply determined by an integer value.
But when the handicap is set to "auto" it's actually being set to a value of -1.
So when this handicap value is displayed in the components of both invite and open based games, It doesn't currently provide the actual stone handicap as that is not stored in the challengeModal which these components pull their data from. It just simply checks for a value of -1 and displays that as "auto".

The stone advantage is determined within the rank_utils file with that functionality going into the RatingCalculator view, where it seems the calculation is done.

What I'd want to explore is having the challengeModal import the functionality to determine the handicap stone amount into itself, so that it can store it as an additional variable which can then be displayed by these components.

I'd obviously want to play with this in a dev environment but currently can't do so as the login feature and consequentially the matchmaking / game creation functionality, doesn't work when I run the repo locally. So my question before continuing is how would I get a locally run version of the repo to allow me to login with dummy accounts to test if I can get the stone handicap to show in both invite/open games?

If @anoek or someone else familiar with this could provide some guidance I'd be happy to try to contribute to this issue!

from online-go.com.

anoek avatar anoek commented on September 4, 2024

You should be able to create games and sign in just fine, however I will note about 1-2 hours ago there was a problem with the database on the beta site so you might have run into some issues if you were trying to do stuff then. (Your local client will connect to the beta servers for account and game stuff.)

from online-go.com.

JoshuaNascimento avatar JoshuaNascimento commented on September 4, 2024

While I was able to get a working understanding of the interactions between the components concerned with displaying and generating challenges I wanted to get clarification on how exactly the number of handicap stones is generated.

If my understanding is correct then rank_utils doesn't actually do the calculation for the handicap stones, meaning the ChallengeModal in turn does not contain a way to generate that information. I believe the calculation we're looking for is done within the Game component. Specifically, the functionalities of the goban engine determines the stone amount. If that's the case then the handicap stone amount is only ever "known" to us upon actually initializing a game instance.

So if we wished to display the stone amount alongside the "auto" handicap prior to a user accepting a challenge, we would need to call goban before the game occurs to have it determine the handicap stones and use that information in our ChallengeList / Play components.

That being said having to essentially create a game instance before user's consent to a game instance just to pull an integer value doesn't seem like the most intelligent way to go about this. I'll be exploring goban next to see how I can go about this but if there's any chance i'm getting ahead of myself let me know.

from online-go.com.

JoshuaNascimento avatar JoshuaNascimento commented on September 4, 2024

Gonna put this on hold as I think the scope of the issue is a little larger than I initially thought. Will transition to another issue for the time being.

from online-go.com.

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.