source: advance-wars/src/com/medievaltech/unit/Soldier.java@ 99433bb

Last change on this file since 99433bb was fea4b77, checked in by dportnoy <devnull@…>, 13 years ago

Implemented turn and support for computer-controller movement of units. Right now, the computer moves a specific unit down one square when its his turn.

  • Property mode set to 100644
File size: 802 bytes
RevLine 
[113d7cf]1package com.medievaltech.unit;
[a0f5455]2
3import java.util.List;
4
[1a1e8c7]5import android.graphics.Paint;
[a0f5455]6import android.graphics.Point;
7
[fea4b77]8import com.medievaltech.advancewars.Enum.*;
9
[a0f5455]10public class Soldier extends Unit{
[78d3c6f]11 public Soldier(Paint p)
12 {
[1a1e8c7]13 super(p);
[ebaddd9]14
[b23048f]15 move = 3;
[78d3c6f]16
[fea4b77]17 type = UnitType.LAND;
[78d3c6f]18 minAttackRange = 1;
19 maxAttackRange = 1;
[1a1e8c7]20 }
21
[a0f5455]22 @Override
[a79ce1b]23 public void move(Point point) {
[a0f5455]24 // TODO Auto-generated method stub
[a79ce1b]25
[a0f5455]26 }
27
28 @Override
[a79ce1b]29 public void attack(Point point) {
[a0f5455]30 // TODO Auto-generated method stub
[a79ce1b]31
[a0f5455]32 }
33
34 @Override
[ebaddd9]35 public List<Point> getMovementRange() {
36 return super.getMovementRange();
[a0f5455]37 }
38
39 @Override
40 public void die()
41 {
42
43 }
44
45 @Override
46 public List<Point> getAttackRange() {
47 // TODO Auto-generated method stub
48 return null;
49 }
50
51
52}
Note: See TracBrowser for help on using the repository browser.