mpereira / tty-solitaire

Play solitaire in your terminal!
MIT License
279 stars 33 forks source link

Show "end game" screen instead of exiting the game and showing a terminal message #18

Open mpereira opened 7 years ago

mpereira commented 7 years ago

Also allow the player to play again by pressing spacebar or quitting the game by pressing q like in the greeting screen.

greno4ka commented 6 years ago

I ll try to find some more time to release a PR for allowing player to play again. #22

basxto commented 5 years ago

One could write “You won” on the cards in the top right and on the empty stacks. But for this it would be necessary to automatically move the cards to the top right.

┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓
┃Y♥     ┃O♦     ┃U♣     ┃ ♠     ┃
┃       ┃       ┃       ┃       ┃
┃       ┃       ┃       ┃       ┃
┃       ┃       ┃       ┃       ┃
┃      ♥┃     W♦┃     O♣┃     N♠┃
┗━━━━━━━┻━━━━━━━┻━━━━━━━┻━━━━━━━┛

┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│█   █│ │ ███ │ │█  █ │ │     │ │█   █│ │ ███ │ │██  █│
│ ███ │ │█   █│ │█  █ │ │     │ │█ █ █│ │█   █│ │█ █ █│
│  █  │ │ ███ │ │ ██  │ │     │ │ █ █ │ │ ███ │ │█  ██│
└─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘
greno4ka commented 4 years ago

Cool! I can try to make a PR on this.

greno4ka commented 4 years ago

The problem is that card has 7 chars in width and 5 chars in height. So I can't imagine letters with such sizes. And I think my previous PR was much more beautiful!

dther commented 4 years ago

I'm thinking of making some kind of "solving" animation, so that we can finally have a bit more fanfare than a quit and a terminal message. I think @greno4ka's pull request could look really nice on the solved board!

mpereira commented 4 years ago

@dther sounds cool. Regarding the "end message" I was thinking something simpler would be best. For example, just a "You won!" message wrote in text somewhere on the board. Future functionality could also include showing the time to win, and amount of points.