Added ability to move units

This commit is contained in:
Ziver Koc 2007-04-04 18:28:59 +00:00
parent 7c5cbe83fa
commit ef64874f36
3 changed files with 19 additions and 13 deletions

View file

@ -69,16 +69,9 @@ public class Map {
* @return True if empty else false
*/
public boolean isPosEmpty(int x, int y){
if(map[x][y] != null){
if(map[x][y] == null){
return true;
}
for(int i=0; i<width ;i++){
for(int j=0; j<hight ;j++){
if(map[i][j] != null){
System.out.println("LOL: "+i+" "+j);
}
}
}
return false;
}
@ -122,4 +115,18 @@ public class Map {
public Node getMapNode(){
return mapNode;
}
/**
* Prints all the units on the map
*
*/
public void printAllUnits(){
for(int i=0; i<width ;i++){
for(int j=0; j<hight ;j++){
if(map[i][j] != null){
System.out.println("LOL: "+i+" "+j);
}
}
}
}
}