Log In  

Cart #43629 | 2017-08-26 | Code ▽ | Embed ▽ | No License
1

P#43469 2017-08-20 06:52 ( Edited 2017-08-26 04:31)

Hello! Nice game!

One enhancement you could do is deal two cards to the player by default. There's no way you can bust with two cards and it's a waste having to hit hit before deciding :)

Also be aware that the Ace can either be a 1 (one) or an 11 (eleven). That's why you can win with (A,10), (A,J), (A,Q) and (A,K).
[Edit1]: Wait, I see that you do take this into account, then why didn't it make my hand win?
[Edit2]: OK, so I did a bit of debugging, and when the sum should total 21 the Ace is always regarded as a 1.
Fix: Line 215 that test is:

 if (v+11<21) then 

and it should be

 if (v+11<=21) then 

Also bonus:


With regards to the auto dealing I added this line twice after line 68:

add(hand,draw_card(true))

P#43472 2017-08-20 06:58 ( Edited 2017-08-20 11:21)

Yeah, I noticed I forgot the = in <= when checking for the ace values. As for dealing two cards to start, I could do that easily enough, yeah. I just was enjoying dealing them out manually, personally.

Edit I've gone ahead and updated it with the fix (that I had on my local copy) for aces not being counted when equaling exactly 21. I also added the first two cards dealt out automatically.

P#43492 2017-08-20 14:38 ( Edited 2017-08-20 18:40)

Awesomeness! Sorry about the double card dealing. Didn't know it was your preference :D I was just used to seeing it everywhere.

The game is super awesome and already its got the quality of a finished cart. :D Good luck, man! :) I'll enjoy playing this game.

P#43499 2017-08-20 16:34 ( Edited 2017-08-20 20:34)

Hey, just stumbled upon an issue and after playing the decks I started getting negative numbers for the decksize... and diving deeper I saw that the deck would never diminish in length. The problem stems on line 195:

del(deck,selected)

This should be changed in:

del(deck,drawn)

As the documentation states:

del t v

        Delete the first instance of value v in table t [...]
P#43500 2017-08-20 16:42 ( Edited 2017-08-20 20:42)

I can see why that would cause issues.
I wrote this up instead of sleeping at a reasonable hour. I'll fix that.

P#43501 2017-08-20 18:02 ( Edited 2017-08-20 22:02)

Haha, don't be bothered by it... I used to/still do that.

Weird creations happen when you do it and it's awesome that sometimes awesome things emerge! :D
Cool project, love it! :)

Good luck! And I hope you're not bothered by it. I love to help, but I see no way of messaging an individual on pico8 :/

P#43506 2017-08-21 04:10 ( Edited 2017-08-21 08:10)

Simple but fun.

Some enhancements you could add:

  • Show the players' total in hand, and the dealer's shown total.

  • Have the player auto-win if they are dealt 21 -- unless the dealer has 21 as well, then it would be a push (right now you need to manually select 'stay' if you have 21 to start)
P#43532 2017-08-22 13:05 ( Edited 2017-08-22 17:05)

Hooray. Another good Pico-8 card game.

P#43537 2017-08-22 15:49 ( Edited 2017-08-22 19:49)

I've incorporated your suggestions, enargy.

In testing before posting about this, the dealer pushed me at 21.

P#43543 2017-08-23 05:37 ( Edited 2017-08-23 09:37)

Stupid Question : What is the text in the upper right?

P#43551 2017-08-23 12:24 ( Edited 2017-08-23 16:24)

Remaining cards in the deck, to give the player an idea of how far along it is.

P#43571 2017-08-24 03:10 ( Edited 2017-08-24 07:10)

Ah. Got it. For card-counters.

Edit : No, wait. I still don't get it.
How does it start with two cards dealt and 190 cards in the deck? That seems like there's 16 cards missing.

P#43575 2017-08-24 09:38 ( Edited 2017-08-24 13:43)

@apLundell I was intrigued by your question and checked the code. You are right, there are exactly 16 cards missing: all the 10s. The make_deck method doesn't add them to the deck.

P#43576 2017-08-24 10:27 ( Edited 2017-08-24 14:27)

Ha! I see it now.

Mystery solved!

P#43582 2017-08-24 11:49 ( Edited 2017-08-24 15:49)

Whoops.

Edit The decks now have 10s in them.

P#43628 2017-08-26 00:29 ( Edited 2017-08-26 04:32)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-16 20:41:17 | 0.028s | Q:33