Today in class we played each others Blackjack games and gave comments, feedback and compliments on the games. We wrote down what we liked about each others game and what could be improved about it as well as tips on it.
In particular I was asked to explain a line in my code which contained a question mark an a colon. Now I will explain what the question mark does and what the colon does. The question mark and the colon act as an if else statement. The reason I had to include this line in my code is because of the API’s I used to display my images, the API’s have a number at the end that displays the value of the card. The people that created the API’s wanted uniformity, they wanted the url to be the same length for every card so they couldn’t use 10 because it would make that url longer so instead they used 0. I put that line in the code because I wanted to say that if the value is 10 return 0 if not return the value of the card. Basically if 10 return 0 else return the value of the card.




