1 package se
.umu
.cs
.dit06ajnajs
.agent
;
4 import java
.awt
.Graphics
;
6 public class FootmanUnit
extends Unit
{
8 public FootmanUnit(int xPos
, int yPos
, int height
, int width
, Direction direction
) {
9 super(xPos
, yPos
, height
, width
, direction
);
12 public void update() {
14 switch (super.direction
) {
16 System
.out
.println("UP");
19 System
.out
.println("DOWN");
22 System
.out
.println("LEFT");
24 System
.out
.println("RIGHT");
28 public void paint(Graphics g
) {
29 // TODO Auto-generated method stub
30 g
.setColor(Color
.BLACK
);
31 g
.drawRect(super.xPos
, super.yPos
, super.width
, super.height
);