Skip to content

27-3 Coree#569

Open
ThesisCoree wants to merge 2 commits intorocketacademy:mainfrom
ThesisCoree:main
Open

27-3 Coree#569
ThesisCoree wants to merge 2 commits intorocketacademy:mainfrom
ThesisCoree:main

Conversation

@ThesisCoree
Copy link

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.

Copy link

@floatingtales floatingtales left a 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!


#container {
background-color: pink;
background-color: rgb(109, 156, 242);

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>

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;

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`;

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);
}

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) {

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!

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