-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
27-3 Coree #569
base: main
Are you sure you want to change the base?
27-3 Coree #569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great project attempt, coree! I'm certain that you have a future in programming if you're always down to learn new concepts each and every single day!
@@ -18,7 +18,7 @@ | |||
} | |||
|
|||
#container { | |||
background-color: pink; | |||
background-color: rgb(109, 156, 242); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love to see you having fun with colors! It certainly makes it a more personalized game!
<p>For example, if you roll a 1 and 5, your best answer would be 51.</p> | ||
|
||
<p>This is a two-player game, so grab a friend ya scally wags! 🧞♀️🧞♂️</p></center> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that you have a div for instructions here! just a small thing.
id names are generally standardised in kebab-case
so it is best to have game-instructions
.
also, while the <center> center tag </center>
works, a lot of the newer browsers are starting to phase out the center tag. It's not part of the newer HTML standard.
|
||
// Helper Function | ||
var diceRoll = function () { | ||
return Math.floor(Math.random() * 6) + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey! an awesome one liner here!
var GAME_STATE_COMPARE_SCORES = "GAME_STATE_COMPARE_SCORES"; | ||
var gameState = GAME_STATE_DICE_ROLL; | ||
|
||
var INSTRUCTIONS_FOR_NEXT_GAME_STATE = `Please choose the order of the dice by inputting 1 or 2`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great use of constants here!
for (var counter = 0; counter < 2; counter += 1) { | ||
currentPlayerRolls.push(diceRoll()); | ||
console.log("error check " + currentPlayerRolls); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great that you've opted for a for loop here.
Also generally, it's best to remove console logs from final codebase, as console log is for you to check stuff internally.
if (mode == lowestMode) { | ||
checkPlayer1Win = !checkPlayer1Win; | ||
} | ||
if (checkPlayer1Win == true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the if(booleanVariable == true)
here is a bit redundant.
booleanVariable
already has a true/false value, and while you can compare it with a static boolean value, it kinda already is one.
in this instance if(checkPlayer1Win)
already suffice!
Please fill out the survey before submitting the pull request. Thanks!
🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀
How many hours did you spend on this assignment? 6 hours
Please fill in one error and/or error message you received while working on this assignment. An error with the input validation.
What part of the assignment did you spend the most time on? trying to figure out the cause of input validation error
Comfort Level (1-5): 2
Completeness Level (1-5): 4
What did you think of this deliverable? I think it's decent
Is there anything in this code that you feel pleased about? the Html side hahaha
What's one aspect of your code you would like specific, elaborate feedback on? How to make it cleaner and efficient.