I need help making code that will make the Ace have the value of both 1 and 11 when you click stand or call blackjack. I also have a roulette game in my app and can someone also help me find some visuals for that game that might work (this is not my priority). If possible help me fix the blackjack game first and if you have any visuals or ideas where I can find it please let me know. Here is my AIA file.
Edit: I was being a little stupid and I thought that the user could get two Aces in a game of blackjack without getting busted. If ANYBODY knows a place where I can find graphics for the Lottery part or the Roulette please reply in this post. I need it for school and I can't find proper graphics that will match my layout and I might also need help in formatting my app so it actually looks visually good. It would be a great help if someone actually helps me format in MIT app inventor. It's all good if you can't but if you have ANY graphics for my app (I need the graphics) please lmk.
This project was originally for school around the beginning of the school year and I didn't want to work too hard so I just had numbers pop up and there weren't any pictures for the cards. Recently, my teacher said there was a showcase in our district for this MIT app inventor thing and said he could pick 2 projects and said that we could continue off of the one we did in the start of the year. So I just made the pictures off of the stuff I already had so it would be much easier but yes it would be much easier with a list. I simply got a zip file with each of the cards and just renamed the cards to this number system and it was very easy to integrate this number system to my build. I also feel that this took much less time than compared to if I used a list because truly speaking I barely understand how lists work and i'm not too great with it. If you do have any pointers tmrw I will need it because even if I may not use it for this project it might be useful in the future because i'm trash with MIT and I can barely use the program properly. I only know the general idea because I used to do JavaScript and python a year ago. I'm not the best so any ideas or anything really will be very much appreciated.
Yes that is correct, I could get the same card infinitely but what are the chances really. Its very rare for the same card to come up multiple times. It could come twice or so but it isn't really much of a big deal. I don't think the user would even realize it because of the speed of the game but you are correct and it is a big flaw in my design and I need to fix it. At the same time though I don't want to completely restart my build ,so can you code a addition that I can add to a certain part that can fix this?
Rules of Brownjack (from your aia, but accessible from the board):
Rules
GOAL:----------> Try to get all the numbers to add up to 21 or close to 21. You can't go over 21 or else you lose/ get busted.-------------------------------------------------------------------------------------------------------------------------------------------------DRAW/ HIT--------> When you click the draw button you get 2 cards/numbers. Now the Draw button is called Hit and when this button is clicked it gives you one more card for each click. If your cards add up to more then 21 you lose.-------------------------------------------------------------------------------------------------------------------------------------------------- STAND---------> When you are done picking cards/numbers you click stand. The stand button indicates that you want to end the game and it decides if you or your opponent win. Also whoever's added total is closer to 21 but not going over 21 wins. -------------------------------------------------------------------------------------------------------------------------------------------------------
CALL BROWNJACK--------> When the Call BrownJack button is clicked it checks if your cards add up to 21. If they do then you win.But if they don't then you aren't able to click it.
Here's my own take on blackjack shuffling and hand evaluation.
I left out dealer hands.
I also went looking for a different set of card images, because I couldn't make heads or tails of your picture file names. Attributions for the card images:
The pictures I used was screenshotted off of some other persons thing and I just renamed it (pretty sure that might be copyright). Also for the file names I used a wierd method. The first number in the name is by the value it represents in blackjack so a 5 of hearts would have the value of 5 and the second number is the type of card like spades, cloves, diamond and hearts. Spades = 1, cloves = 2, diamonds = 3 and hearts = 4. So for example 7 of spades would be 71. Then I put png at the end because if the value is just a number you can’t set the value of a picture to it so I needed to put a .png at the end. Later I joined out that it will automatically add the .png to the image so I didn’t rly bother deleting what I already had and it became .png.png after the number. Plus because king, jack, queen, and the 10 all have the same value of 10 I added another number after the other ones that is 10 = 1, jack = 2, queen = 3, and king = 4 so for example the queen of hearts would be 1043 because the value is 10, it is a heart and it is a queen. I know this is very confusing but somehow this was the first thing that came to my mind when I thought of a way to do this.
It’s cool how you could do this so easily!! Also the method u used is smth I don’t rly understand currently but it’s super small compared to mine and it isn’t repetitive.