Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/v1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorhansen committed Mar 7, 2020
2 parents 840b42a + 14637d2 commit 3b84add
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pong v1.3.0
# Pong v1.3.1
A Pong clone for the Arduboy

## Controls
Expand Down
4 changes: 2 additions & 2 deletions pong/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ gameSetup()
{
arduboy.initRandomSeed();
resetBall();
// i thought of something funnier than 24...
// set both paddles in the center of the vertical space
player1.setPosition(Vector{ 9, 24 });
player1.resetScore();
player2.setPosition(Vector{ WIDTH - PADDLE_WIDTH - 9, 25 });
player2.setPosition(Vector{ WIDTH - PADDLE_WIDTH - 9, 24 });
player2.resetScore();
draw();
arduboy.display();
Expand Down
5 changes: 3 additions & 2 deletions pong/paddle.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "paddle.hpp"
#include "game.hpp"

#define AI_REACT_X 95
#define AI_RAND 15
// config for ai
#define AI_REACT_X 95 // cutoff for reacting to the ball
#define AI_RAND 15 // reciprocal of the chance of reacting before the cutoff

const Vector& PaddleBase::getPosition() const noexcept
{
Expand Down

0 comments on commit 3b84add

Please sign in to comment.