mirror of
https://github.com/nature-of-code/noc-book-2
synced 2024-11-17 07:49:05 +01:00
Notion - Update docs
This commit is contained in:
parent
ce687204dd
commit
0543318516
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@
|
|||
<p>Next, the walker takes the appropriate step (left, right, up, or down), depending on which random number was picked. Here’s the full <code>step()</code> method closing out the <code>Walker</code> class:</p>
|
||||
<div class="snip-above">
|
||||
<pre class="codesplit" data-code-language="javascript"> step() {
|
||||
// 0, 1, 2, or 3. The random choice determines the step.
|
||||
//{!1} 0, 1, 2, or 3. The random choice determines the step.
|
||||
let choice = floor(random(4));
|
||||
if (choice === 0) {
|
||||
this.x++;
|
||||
|
|
Loading…
Reference in a new issue