Skip to content

Conversation

@eugenematthewcheong
Copy link

Please fill out the survey before submitting the pull request. Thanks!

🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀

How many hours did you spend on this assignment?
15 hours

Please fill in one error and/or error message you received while working on this assignment.
'currentGamemode' undefined.

What part of the assignment did you spend the most time on?
Refactoring and simplifying switching players.

Comfort Level (1-5):
4

Completeness Level (1-5):
5

What did you think of this deliverable?
"It's working..... it's workingggggg" - Young Anakin Skywalker

Is there anything in this code that you feel pleased about?
Just cutting down nearly half the main function's code as it was a duplicate action for each player's turn

What's one aspect of your code you would like specific, elaborate feedback on?

@eugenematthewcheong eugenematthewcheong changed the title Eugene Matthew's Blackjack project 27-1 Eugene Matthew's Blackjack project Feb 11, 2024
Copy link

@bryluke bryluke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the code is logical and flows well. I haven't checked if the game player properly, but things seems to look in order.

One thing i'd challenge you to try is to abstract your output messages from the main function. Maybe do a printOutputMessage() function that returns the strings based on what the current gameState is - this might help you make your code look even more organized!

<!-- Primary Meta Tags -->
<title>Blackjack - Basics - Rocket Academy</title>
<meta name="title" content="YOURNAME's BlackJack Game!">
<meta name="title" content="Eugene Matthew's BlackJack Game!">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good effort on trying to change bits and piece of HTML and CSS

<p>Output:</p>
<div id="output-div"></div>
</div>
<div id="output-div">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job creating this default message to get your game going!

9. The game either ends or continues.
*/

var playerDeck = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job setting up your global states in preparation for the game. It helps to clarify what you're using for the game logic

//MAIN FUNCTION
var main = function (input) {
var myOutputValue = 'hello world';
//PLAYER DRAW CARD
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good use of comments to help me track which point of the game the code flow is at


/*
===================================================================================================================
HELPER FUNCTIONS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job on abstracting code into helper functions and using them well through your code logic

…ic for choosing 1 or 11 when encountering an Ace card.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants