GithubHelp home page GithubHelp logo

About detecting failure about tty-solitaire HOT 3 CLOSED

mpereira avatar mpereira commented on September 27, 2024
About detecting failure

from tty-solitaire.

Comments (3)

mpereira avatar mpereira commented on September 27, 2024 1

Hi @GOKOP,

The X on the stack means that there's no more passes through the deck left. You can see the logic here:

tty-solitaire/src/gui.c

Lines 81 to 85 in ff368bc

if (game.passes_through_deck_left >= 1) {
mvwprintw(stack->card->frame->window, 2, 3, "O");
} else {
mvwprintw(stack->card->frame->window, 2, 3, "X");
}

There's currently no logic in the game to detect an unwinnable scenario.

from tty-solitaire.

GOKOP avatar GOKOP commented on September 27, 2024

So is the fact that on my screenshot it shows an O even though there are no more cards a bug? Also thanks lol, I wonder how many games I've abandoned because I've thought I've lost

from tty-solitaire.

mpereira avatar mpereira commented on September 27, 2024

So is the fact that on my screenshot it shows an O even though there are no more cards a bug?

The "O" means that pressing spacebar on it will move all cards on the waste pile back to the stack, giving the player another pass through the deck. By default, there are three passes. The "O" will become an "X" when the player has been three times through the deck.

Also thanks lol, I wonder how many games I've abandoned because I've thought I've lost

No worries!

from tty-solitaire.

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.