Början på paketet agent
[AntiTD.git] / src / se / umu / cs / dit06ajnajs / agent / FootmanUnit.java
blob1575f127b9c95167d3271ab0e7c7032a8e0c5a38
1 package se.umu.cs.dit06ajnajs.agent;
3 import java.awt.Color;
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() {
13 // TODO Move to Unit?
14 switch (super.direction) {
15 case UP:
16 System.out.println("UP");
17 super.yPos -= 1;
18 case DOWN:
19 System.out.println("DOWN");
21 case LEFT:
22 System.out.println("LEFT");
23 case RIGHT:
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);