Sometimes you just need to give your mind a break and play a game. This app does not save any data to the database.
When you open the page, you start fresh with 5000 credits and when you lose it all or close the page, the game is over.
You are not gambling with anything real or against anyone.
When I decided to learn the AL programming language to write Business Central extensions, this was my first app.
I wanted to design an app that was somewhat simple, but also required a variety of programming skills.
The app incorporates variables, math, string manipulation, loops, arrays, enable/disable user interface objects, random, and if/then statements.
Building this app also forced me to learn how to set up a development environment using Docker, and how to use Visual Studio Code for code development.
The challenges for developing the app were:
Creating a proper deck of 52 cards with the 4 suits, properly numbered in an array as the ‘unshuffled deck’.
Shuffling the deck of cards by randomly picking a card from the unshuffled deck and putting into the shuffled deck.
Calculating the score when an Ace can be an 11 or a 1, depending on what benefits the player.