Skip to content

Commit

Permalink
turned into wqidget
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Paik authored and Joshua Paik committed Jun 26, 2018
1 parent 9db9b88 commit a85aa0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@

</head>
<body>
<p>Use arrow keys.Press c to clear board. </p>
<p>Goal is to go from top left corner to the</p>
<p> bottom right corner with a score of zero.</p>
</body>
</html>
16 changes: 10 additions & 6 deletions sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ moveHistory = [[margin,margin]]

function setup() {

scoreElem = createDiv('Score = ');
scoreElem.position(20, 20);
scoreElem = createDiv();
scoreElem.position(margin, 2);
scoreElem.id = 'score';
scoreElem.style('color', 'black');

pathElem = createDiv('Path:');
pathElem.position(20,45);
pathElem.id = 'path';
pathElem = createDiv();
pathElem.position(margin, 15);
pathElem.style('color', 'black');

lengthOfPath = createDiv();
lengthOfPath.position(margin, 28);
lengthOfPath.style('color', 'black');

createCanvas(300, 300);
player = new gamePiece();
}
Expand All @@ -32,7 +35,8 @@ function draw() {
//Make edges
makeEdges()
scoreElem.html('Score = ' + score);
pathElem.html('Path:' + path)
pathElem.html('Path = ' + path);
lengthOfPath.html('Path Length = ' + path.length);
}


Expand Down

0 comments on commit a85aa0d

Please sign in to comment.