aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsutane <atsutane@freethoughts.de>2009-05-07 11:33:25 +0200
committerAtsutane <atsutane@freethoughts.de>2009-05-07 11:33:25 +0200
commit6f153b1a83b967730b275e90b7eb3509781e92c3 (patch)
tree92b97d7e148792d376642bcd34828822fdcea81a
parentab67ea14b229a1fb2402cdc546cf2450635a458d (diff)
downloadpong-6f153b1a83b967730b275e90b7eb3509781e92c3.tar.gz
pong-6f153b1a83b967730b275e90b7eb3509781e92c3.tar.bz2
p2_ai: Small correction.
-rw-r--r--src/pong.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pong.c b/src/pong.c
index c8c9924..d7f7467 100644
--- a/src/pong.c
+++ b/src/pong.c
@@ -358,12 +358,12 @@ void p2_ai(struct game_data *gd) {
}
/* If that's too hard, add a if ((rand()%3)==1) or so at this point */
- if ((gd->ball->y > gd->p2->y+2) &&
- (gd->p2->y+2 < gd->max_field_y-1)) {
+ if ((gd->ball->y > gd->p2->y+3) &&
+ (gd->p2->y+3 < gd->max_field_y-1)) {
gd->p2->y++;
}
- else if ((gd->ball->y < gd->p2->y-2) &&
- (gd->p2->y-2 > 0)) {
+ else if ((gd->ball->y < gd->p2->y-3) &&
+ (gd->p2->y-3 > 0)) {
gd->p2->y--;
}