Wall.java
Upload User: kikomiki
Upload Date: 2021-10-31
Package Size: 373k
Code Size: 0k
Category:

Games

Development Platform:

Java

  1. import java.awt.*;
  2. public class Wall {
  3. int x, y, w, h;
  4. TankClient tc ;
  5. public Wall(int x, int y, int w, int h, TankClient tc) {
  6. this.x = x;
  7. this.y = y;
  8. this.w = w;
  9. this.h = h;
  10. this.tc = tc;
  11. }
  12. public void draw(Graphics g) {
  13. g.fillRect(x, y, w, h);
  14. }
  15. public Rectangle getRect() {
  16. return new Rectangle(x, y, w, h);
  17. }
  18. }