Git Product home page Git Product logo

Comments (6)

scottven avatar scottven commented on July 28, 2024 1

OK. I think that means I'm better off just ignore undo requests for now until I get my AI calls into my main scheduling loop.

from takserver.

chaitu236 avatar chaitu236 commented on July 28, 2024

But can't it be obtained by moveno%2 ?
Edit: or just flipping current state?

from takserver.

scottven avatar scottven commented on July 28, 2024

Yes, I can parse it out of the PTN, but it would be nice to have a cross-check since this is asynchronous The remote player could be asking to undo their last turn, but the message might not arrive until after I've already sent my next move. For now, incoming commands queue up while waiting for the AI move, so that makes the race easier to lose.

from takserver.

chaitu236 avatar chaitu236 commented on July 28, 2024

Even if I put a turn no. or player name in the msg, if you send your move without undoing, the board state is messed up anyway and this wouldn't fix anything. Maybe after the AI moves, you could process the server commands and only send the AI move if there was no Undo...

from takserver.

scottven avatar scottven commented on July 28, 2024

With the current scheduling, it'll actually send the new move, then process the undo request. Does the server drop the undo request when it see a new move from the non-requesting player?

from takserver.

chaitu236 avatar chaitu236 commented on July 28, 2024

Yes, it drops the request if either of the players make a move.

from takserver.

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.