Giter VIP home page Giter VIP logo

my_very_good_klondike's People

Contributors

kemcbride avatar

Stargazers

 avatar

Watchers

 avatar  avatar

my_very_good_klondike's Issues

Another broken move case???

 f1    f2    f3    f4      s( 2♥) ( 4♠) ( 4♦) ( 3♣)   <9♣>
p1 [9♥,8♣,7♥,6♠,5♦,4♣]p2 [10♠,9♦]p3 [X][7♠,6♥,5♠]p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♣,6♦,5♣,4♥]p5 [K♠,Q♦,J♣,10♥]p6 [K♦]
p7 [X][X][X][7♦,6♣]cmd: m p1 1 f4 f1    f2    f3    f4      s( 2♥) ( 4♠) ( 4♦) ( 4♣)   <9♣>
p1 [9♥,8♣,7♥,6♠,5♦]
p2 [10♠,9♦]
p3 [X][7♠,6♥,5♠]p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♣,6♦,5♣,4♥]p5 [K♠,Q♦,J♣,10♥]
p6 [K♦]
p7 [X][X][X][7♦,6♣]cmd: m p4 1 p3Invalid move: doesn't satisfy run constraints f1    f2    f3    f4      s
( 2♥) ( 4♠) ( 4♦) ( 4♣)   <9♣>
p1 [9♥,8♣,7♥,6♠,5♦]p2 [10♠,9♦]
p3 [X][7♠,6♥,5♠]
p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♣,6♦,5♣,4♥]
p5 [K♠,Q♦,J♣,10♥]
p6 [K♦]
p7 [X][X][X][7♦,6♣]
cmd: m p4 1 p3
Invalid move: doesn't satisfy run constraints
 f1    f2    f3    f4      s
( 2♥) ( 4♠) ( 4♦) ( 4♣)   <9♣>
p1 [9♥,8♣,7♥,6♠,5♦]
p2 [10♠,9♦]
p3 [X][7♠,6♥,5♠]
p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♣,6♦,5♣,4♥]
p5 [K♠,Q♦,J♣,10♥]
p6 [K♦]
p7 [X][X][X][7♦,6♣]
cmd:

Why can't I move that 4 from the bottom of p4 to p3?
It definitely should be allowed.

Might really be time to implement some unit tests hahaha.

can't move run starting with king to empty pile

whta's up with that

f1 f2 f3 f4 s |moves: 31|
( 4♠) ( 3♦) ( A♣) ( - ) <8♠>
p1 [K♣,Q♥,J♣,10♥,9♣,8♦,7♣,6♦,5♠]
p2
p3 [10♦]
p4 [K♦,Q♠,J♥]
p5 [X][7♦,6♣,5♥,4♣]
p6 [X][X][X][X][7♥,6♠]
p7 [X][X][X][X][X][X][6♥,5♣,4♦,3♣,2♥]
cmd: m p4 3 p1
mcmd count: 3
move count: 3
3
[K♦,Q♠,J♥]
Invalid move: doesn't satisfy run constraints
f1 f2 f3 f4 s |moves: 31|
( 4♠) ( 3♦) ( A♣) ( - ) <8♠>
p1 [K♣,Q♥,J♣,10♥,9♣,8♦,7♣,6♦,5♠]p2
p3 [10♦]
p4 [K♦,Q♠,J♥]
p5 [X][7♦,6♣,5♥,4♣]p6 [X][X][X][X][7♥,6♠]
p7 [X][X][X][X][X][X][6♥,5♣,4♦,3♣,2♥]
cmd:

Add manual reveal command + implementation

Why would I add this? Who knows.

But I already added autoreveal as a flag and default to true, which is.. what I already implemented. How would manual reveal look? Why not do it?

Add method to toggle settings during games

ie. startup flags like

  • autosolve
  • autoreveal
  • timed scoring
  • scoring counts recycles as -100 😮
  • etc...

How should it look?

I'm imagining that the startup flags end up passed to the Board object, and then we have these enable/disable methods on the board, and instead of creating a new board, we give board a "new_game" or "reset" method - so that way basically it maintains the settings that a person has changed throughout their play session. (rather than, eg, current behavior would be to create an entirely new board, and we would reuse the state from the cli flags at startup)

Also I'm imagining in-game for it to kinda look like a settings menu, so like a sub-repl to the main game one. 😮

Draw 1 stock behavior issue

When you pull a card off the stock, instead of showing the "next" card in the stock, you should show the "previous" card.

Figure out why it gets really slow sometimes (and solve it)

Sometimes during a game you can tell that something is messed up in the like, generation of possible moves. Because the prompt, board, etc. take much longer to pop up. Aka

From like idk 1ms to 500ms.

That's messed up!

I think it has something to do with either empty piles, piles with only Kings on them, or having all piles populated. Something like that.

Make hints not suggest useless moves

examples of useless moves:

  1. moves from one foundation to another
  2. moves from the stock that cannot be done in the current state should be translated into "next", and only appear as a legit move when they are possible for the player
  • in order to do 2, it might make more sense to have hint return a command? translate legal moves -> legal//hintable_cmds, then have hint iterate through the valid commands ratehr than the legal moves. so on next, you don't recompute legal moves, but you do recompute hintable_cmds.
  1. (hard case) reversible useless moves. (the hard part is, these moves CAN be useful. so.. idk)

Something weird happened...

With seed... (default):

 f1    f2    f3    f4      s
( 3♠) ( 2♥) ( 2♣) ( - )   <7♦>
p1 [K♥,Q♣,J♥]
p2 [K♦,Q♠]
p3
p4 [5♠]
p5 [X][X][X][X][9♦,8♠]
p6 [X][X][X][X][2♦]
p7 [X][X][K♣,Q♦,J♠,10♥,9♣,8♦,7♣,6♦,5♣,4♦]
cmd: m p7 9 p3
Invalid move; try something else.
 f1    f2    f3    f4      s
( 3♠) ( 2♥) ( 2♣) ( - )   <7♦>
p1 [K♥,Q♣,J♥]
p2 [K♦,Q♠]
p3
p4 [5♠]
p5 [X][X][X][X][9♦,8♠]
p6 [X][X][X][X][2♦]
p7 [X][X][K♣,Q♦,J♠,10♥,9♣,8♦,7♣,6♦,5♣,4♦]
cmd: m p7 1 p4
 f1    f2    f3    f4      s
( 3♠) ( 2♥) ( 2♣) ( - )   <7♦>
p1 [K♥,Q♣,J♥]
p2 [K♦,Q♠]
p3
p4 [5♠,4♦]
p5 [X][X][X][X][9♦,8♠]
p6 [X][X][X][X][2♦]
p7 [X][X][K♣,Q♦,J♠,10♥,9♣,8♦,7♣,6♦,5♣]
cmd: m p7 9 pp4
Invalid dest: pp4
 f1    f2    f3    f4      s
( 3♠) ( 2♥) ( 2♣) ( - )   <7♦>
p1 [K♥,Q♣,J♥]
p2 [K♦,Q♠]
p3
p4 [5♠,4♦]
p5 [X][X][X][X][9♦,8♠]
p6 [X][X][X][X][2♦]
p7 [X][X][K♣,Q♦,J♠,10♥,9♣,8♦,7♣,6♦,5♣]
cmd: m p7 9 p4
doesnt satisfy run constraints
 f1    f2    f3    f4      s
( 3♠) ( 2♥) ( 2♣) ( - )   <7♦>
p1 [K♥,Q♣,J♥]
p2 [K♦,Q♠]
p3
p4 [5♠,4♦]
p5 [X][X][X][X][9♦,8♠]
p6 [X][X][X][X][2♦]
p7 [X][8♣]

During that last step...
It successfully did the take() from p7 - but then failed to do the put for p4
Whoops, I meant to put it on p3.

But in any case - it should tell you it fails, and actually make the move not happen at all.

I guess that it did the take, and then failed to do the put, but didn't return the original take() back onto its run.

***** Also ----- double check that during a move, it doesn't auto-reveal the top run -
if it revealed the run, then it wouldn't be able to return the stack back to its position, since that would become invalid!!!

card disappears if put onto empty pile but not valid for that pile

here, i accidentally put a queen on an empty pile instad of on the king next to it:

 f1    f2    f3    f4      s
( 5♦) ( 3♠) ( 6♥) ( 4♣)   <4♠>
p1 [K♠]
p2 [K♦,Q♣,J♦,10♠,9♥,8♠,7♦,6♣]
p3 [6♦]
p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♠]
p5 [Q♠]
p6 [X][X][X][10♣,9♦,8♣,7♥]
p7 [K♥]
cmd: m p3 1 p4
 f1    f2    f3    f4      s
( 5♦) ( 3♠) ( 6♥) ( 4♣)   <4♠>
p1 [K♠]
p2 [K♦,Q♣,J♦,10♠,9♥,8♠,7♦,6♣]
p3
p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♠,6♦]
p5 [Q♠]
p6 [X][X][X][10♣,9♦,8♣,7♥]
p7 [K♥]
cmd: m s f2
 f1    f2    f3    f4      s
( 5♦) ( 4♠) ( 6♥) ( 4♣)   <J♣>
p1 [K♠]
p2 [K♦,Q♣,J♦,10♠,9♥,8♠,7♦,6♣]
p3
p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♠,6♦]
p5 [Q♠]
p6 [X][X][X][10♣,9♦,8♣,7♥]
p7 [K♥]
cmd: m p5 1 p6
doesn't satisfy run constraints
Only Kings can be placed on an empty pile
 f1    f2    f3    f4      s
( 5♦) ( 4♠) ( 6♥) ( 4♣)   <J♣>
p1 [K♠]
p2 [K♦,Q♣,J♦,10♠,9♥,8♠,7♦,6♣]
p3
p4 [K♣,Q♥,J♠,10♦,9♠,8♦,7♠,6♦]
p5
p6 [X][X][X][10♣,9♦,8♣,7♥]
p7 [K♥]

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.