diff options
| author | Atsutane <atsutane@freethoughts.de> | 2009-05-07 11:33:25 +0200 |
|---|---|---|
| committer | Atsutane <atsutane@freethoughts.de> | 2009-05-07 11:33:25 +0200 |
| commit | 6f153b1a83b967730b275e90b7eb3509781e92c3 (patch) | |
| tree | 92b97d7e148792d376642bcd34828822fdcea81a /src | |
| parent | ab67ea14b229a1fb2402cdc546cf2450635a458d (diff) | |
| download | pong-6f153b1a83b967730b275e90b7eb3509781e92c3.tar.gz pong-6f153b1a83b967730b275e90b7eb3509781e92c3.tar.bz2 | |
p2_ai: Small correction.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pong.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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--; } |
