Skip to content

FTBC5-1 Frankie#29

Open
eatplastik wants to merge 4 commits intorocketacademy:mainfrom
eatplastik:master
Open

FTBC5-1 Frankie#29
eatplastik wants to merge 4 commits intorocketacademy:mainfrom
eatplastik:master

Conversation

@eatplastik
Copy link

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

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

How many hours did you spend on this assignment?
Lost count really

Please fill in one error and/or error message you received while working on this assignment.
reference errors, type errors, loads of logical errors

What part of the assignment did you spend the most time on?
game logic

Comfort Level (1-5):
3

Completeness Level (1-5):
3

What did you think of this deliverable?
the loose concept i had panned out okay. i enjoyed testing the winning condition logic

Is there anything in this code that you feel pleased about?
being able to write some parts of the code in very few lines

Copy link

@michelle-mok michelle-mok left a comment

Choose a reason for hiding this comment

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

good work organising your code into functions and different files!
consider adding more comments so that it is easier for the reader to follow your code
keep up the good work!

Comment on lines +30 to +69
const gameContainer = document.createElement('div');
gameContainer.classList.add('game-container');
document.body.appendChild(gameContainer);

pointsContainer = document.createElement('div');
pointsContainer.classList.add('points');
pointsContainer.innerText = `You have: ${userPoints} points`;
gameContainer.appendChild(pointsContainer);

cardContainer = document.createElement('div');
cardContainer.classList.add('card-container');
gameContainer.appendChild(cardContainer);

// Message
const gameInfo = document.createElement('div');
gameInfo.classList.add('message');
gameContainer.appendChild(gameInfo);

const buttons = document.createElement('div');
buttons.classList.add('buttons');
gameContainer.appendChild(buttons);

// Deal button
const dealButton = document.createElement('button');
dealButton.innerText = 'DEAL';
buttons.appendChild(dealButton);

// Swap button
const swapButton = document.createElement('button');
swapButton.innerText = "SWAP";
buttons.appendChild(swapButton);

// Reset game button
const resetButton = document.createElement('button');
resetButton.innerText = "RESET";
buttons.appendChild(resetButton);

const cardBack = document.createElement('div');
cardBack.classList.add('card-back');
cardBack.innerHTML = "Be a quitter :" + "<br/>" + "1800-6-668-668";

Choose a reason for hiding this comment

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

consider putting this in a function (eg, buildBoard)in script.js instead

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