Skip to content

Commit

Permalink
hello
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbyBaritone94 committed Feb 3, 2021
1 parent 3e358c4 commit ff97587
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ <h1>Player 2</h1>
</div>
</main>
<script src="index.js"></script>

</body>
</html>

15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ keys = []



// function computerLogic()
// {
// if(player1.x<player2.x)
// {
// player2.moveLeft()
// }
// if(player1.x>player2.x)
// {
// player2.moveRight()
// }
// }



/////////////////////////////
//////Images for game////////
/////////////////////////////
Expand Down Expand Up @@ -388,6 +402,7 @@ if(player2.grounded){
player2.x += player2.velX;
player2.y += player2.velY;

//computerLogic()

interval = requestAnimationFrame(playGame)
canvasDisplay.animate()
Expand Down

0 comments on commit ff97587

Please sign in to comment.