Skip to content

Conversation

@anasmos
Copy link

@anasmos anasmos commented Jan 12, 2018

I hope my work is right.

Copy link
Owner

@remarcmij remarcmij left a comment

Choose a reason for hiding this comment

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

Excellent work. Fully meets the requirements of the assignment.

const cellContents = board[y][x];

if (cellContents === '.' || cellContents === 'F') {
if (cellContents === '.' || cellContents === 'F' || cellContents==='A') {
Copy link
Owner

Choose a reason for hiding this comment

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

Add a space before and after the ===. This happens automatically if you use the Format Document command in VSCode.

board[y][x] = 'R';
if (cellContents === 'A') {
appleEaten = true;
applesEaten ++;
Copy link
Owner

Choose a reason for hiding this comment

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

It is customary to append the ++ (or --) directly to the variable to which it applies (without an intervening space).

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