Share your repls and programming experiences

← Back to all posts
PONG
hosuao (1)

gamemodes[0] = player vs cpu
gamemodes[1] = player vs player (this isnt working properly right now)
gamemodes[2] = cpu vs cpu

Comments
hotnewtop
MikeJMS8910 (160)

Wow much better than me. How come they move at the same positions when its cpu vs cpu

ANDREWVOSS (187)

Because they're both perfectly following the ball @MikeJMS8910

hosuao (1)

@MikeJMS8910 Both are using the same exact AI to follow the ball. @ANDREWVOSS They also don't exactly follow the ball (to make it somewhat beatable). You can see this for yourself if you lower the cpu speed!