Android Open Source - pong-android Player






From Project

Back to project page pong-android.

License

The source code is released under:

MIT License

If you think the Android project pong-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package catalinc.games.pong;
//from  w w  w  . j  ava  2 s  .  co m
import android.graphics.Paint;
import android.graphics.RectF;

class Player {

    int paddleWidth;
    int paddleHeight;
    Paint paint;
    int score;
    RectF bounds;
    int collision;

    Player(int paddleWidth, int paddleHeight, Paint paint) {
        this.paddleWidth = paddleWidth;
        this.paddleHeight = paddleHeight;
        this.paint = paint;
        this.score = 0;
        this.bounds = new RectF(0, 0, paddleWidth, paddleHeight);
        this.collision = 0;
    }

}




Java Source Code List

catalinc.games.pong.Ball.java
catalinc.games.pong.Player.java
catalinc.games.pong.PongThread.java
catalinc.games.pong.PongView.java
catalinc.games.pong.Pong.java