Higher or Lower? – Captivate Game and Puzzle Series
May 28, 2021
Higher or Lower? – Captivate Game and Puzzle Series
May 28, 2021
I am currently a provider of technical training and support in the electronic manufacturing industry. My prior training and work experience as a teacher, network administrator, web design, and instructional design make me well prepared to design it, develop it, and deliver it. I am a father of five, a US Army veteran, and I enjoy playing the guitar as well as performing in local community theater. 
Legend 99 posts
Followers: 157 people

This is a card game where you reveal a card and then must predict whether the next card will be higher or lower than the first one. You will begin with $10,000 and you will need to wager on your confidence in your prediction. With 52 cards – you will have 26 matches to try to earn as much money as possible.

Think you’re the big winner? Well, talk is cheap – post your screenshots!

Preview Project

<—— Game and Puzzle Series

All Comments
Sort by:  Most Recent
Nov 9, 2022

How fun!  Thanks.  I’d add to the Rules that a tie is not higher or lower so a loss either way and also mention that A’s are high, not low.

Thanks for sharing.

Terri

Like
Nov 11, 2022

Thanks for the feedback, Terri.

The ideas regarding Aces and ties are already mentioned in the rules.

Like
May 29, 2021

I have a test project here for anyone to test that formatting works for their region.

http://www.thirdleveltraining.com/captivate/hiLowGame/index.html

I have tried to accommodate for (comma), (decimal), and (narrow non-breaking space)

Like
(1)
May 29, 2021

Works perfectly for French in this new version !… (even if I am currently in England…)

I had 3 attachments… 1 easy bet… 1 unlucky bet… And my final result !…

PS : Maybe you could add the number of cards still to play… And in the rules, you may precise that if the cards are even, it’s a lost bet !…

Anyway, it’s a big win for you to manage to make it works perfectly !…

😉

Edit : I can attach only one file !!!???… It’s my final result so… And you owe me $ 33,248,000 (in the american format !…)

Attachment

Like
May 28, 2021

Thanks for sharing that.

I believe this to be due to the way numbers and money are typically formatted on your computer.

In the US, we use commas and if I am not mistaken, you likely use periods.

I wanted the dollar amounts to be nicely formatted so I found a way to strip the comma and revert it from string to number, change the value, and then convert back to the nicely formatted string.  It works great on my PC/iPad but my guess is that when it encounters the different formatting rules of your PC, it breaks – something I clearly wasn’t capable of testing easily.

I will see what I can figure out and post an update.

Like
View All 3 Replies
May 28, 2021

I couldn’t think of this issue !!!…

But you must be right !…

If it could help :

When I open the game, my bet is : $ 1,000 (US way)

If I want to add 1000, it becomes : $ 2 000 (European way !!!???…)

And if I click once again to add 1000 (or other values) :  $ NaN

I hope you’ll find an easy way to solve this !… I want to play !!!…

Like
May 28, 2021

I had actually tried to consider this when I was still working it out.

I am using a function to specifically strip the comma and leave behind a number – so a number value can be added such as 1000

Then I use .toLocaleString(undefined) to allow the number to be formatted based on your settings. That is why you see it as European format. (Good – that part works)

Problem is when you change it a second time – there is no comma to strip out and it breaks. I was excited to have that part work on my machine and did not consider it might break elsewhere.

So I need to figure out the first part.

Does your format only have a space?

Like
May 28, 2021

Yep !…

One space (instead of the comma) !…

And it works well for french (european) numbers : if I add 10M, I obtain 10 001 000 which is fine for me !…

Like