Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPeter Mingione
10,760 PointsVery Confusing Instructions
I am lost and cannot follow this lesson. I don't understand how the game is played. How do 2 players run the game?
4 Answers
Travis Alstrand
Treehouse Project ReviewerHey Peter Mingione 👋
Since this was posted in the general "JavaScript" topic, I'm unsure of what video/lesson you're referring to. Can you provide a link to the video you're on please?
Peter Mingione
10,760 PointsSorry my bad .... "JavaScript Unit Testing" , "Improving Our Tests" https://teamtreehouse.com/library/javascript-unit-testing/getting-started-with-mocha-and-chai
Travis Alstrand
Treehouse Project ReviewerOh I see, well I haven't taken this course unfortunately, so I'm not 100% sure, but with looking at the code it doesn't look like the code itself contains a playable game, just the two functions that would likely be in the game that can be utilized for the testing: checkForShip()
, fire()
and damageShip()
. Since the course is specifically aimed at Unit Testing, have a functional game isn't necessary.
If you're curious about how the game "Battleship" works in general, which is what is being replicated here, you can check out this blogpost about it with a description and images explaining it.
Peter Mingione
10,760 PointsThank you Travis
Travis Alstrand
Treehouse Project ReviewerYou're welcome 😃