package common;

/**
 * 
 * References non-floor objects
 *
 */
public enum MapObjectType {
	PLAYER(0), //Identification of player's own self and other players.
	MONSTER(1),
	TREE(2),
	BUSH(3),
	ROCK(4),
	WALL_WOOD(5),
	WALL_STONE(6);
	
	static final long serialVersionUID = 8975595;
	private final int ID;
	
	private MapObjectType(int ID)
	{
		this.ID = ID;
	}
	
	public int getID()
	{
		return ID;
	}
	
	public boolean canMoveOn(){
		return false;
	}
	public boolean canPickUp(){
		return false;
	}
	public boolean canAttack(){
		return this == MONSTER;
	}
	public boolean canHarvest(){
		return (this == TREE || this == BUSH || this == ROCK);
	}
	
	public Resource resource()
	{
		switch(this)
		{
		case TREE:
			return Resource.WOOD;
		case BUSH:
			return Resource.BERRY;
		case ROCK:
			return Resource.STONE;
		case WALL_WOOD:
			return Resource.WOOD;
		case WALL_STONE:
			return Resource.STONE_BRICK;
		default:
			return null;
		}
	}
}

@@ -12,17 +12,21 @@
 mon;
-%0A
+%0D%0A%0D
 %0A/**
+%0D
 %0A * 
+%0D
 %0A * 
@@ -57,15 +57,18 @@
 ects
+%0D
 %0A *
+%0D
 %0A */
+%0D
 %0Apub
@@ -91,16 +91,17 @@
 ctType %7B
+%0D
 %0A%09PLAYER
@@ -161,16 +161,17 @@
 players.
+%0D
 %0A%09MONSTE
@@ -175,16 +175,17 @@
 STER(1),
+%0D
 %0A%09TREE(2
@@ -186,16 +186,17 @@
 TREE(2),
+%0D
 %0A%09BUSH(3
@@ -197,16 +197,17 @@
 BUSH(3),
+%0D
 %0A%09ROCK(4
@@ -208,16 +208,17 @@
 ROCK(4),
+%0D
 %0A%09WALL_W
@@ -224,16 +224,17 @@
 WOOD(5),
+%0D
 %0A%09WALL_S
@@ -241,18 +241,20 @@
 TONE(6);
+%0D
 %0A%09
+%0D
 %0A%09static
@@ -292,16 +292,17 @@
 8975595;
+%0D
 %0A%09privat
@@ -316,18 +316,20 @@
  int ID;
+%0D
 %0A%09
+%0D
 %0A%09privat
@@ -351,19 +351,21 @@
 (int ID)
+%0D
 %0A%09%7B
+%0D
 %0A%09%09this.
@@ -368,29 +368,32 @@
 his.ID = ID;
+%0D
 %0A%09%7D
+%0D
 %0A%09
+%0D
 %0A%09public int
@@ -400,19 +400,21 @@
  getID()
+%0D
 %0A%09%7B
+%0D
 %0A%09%09retur
@@ -422,109 +422,13 @@
  ID;
+%0D
 %0A%09%7D
-%0A%09%0A%09public boolean canMoveOn()%7B%0A%09%09return false;%0A%09%7D%0A%09public boolean canPickUp()%7B%0A%09%09return false;%0A%09%7D
+%0D
 %0A%09pu
@@ -452,16 +452,17 @@
 ttack()%7B
+%0D
 %0A%09%09retur
@@ -479,19 +479,21 @@
 MONSTER;
+%0D
 %0A%09%7D
+%0D
 %0A%09public
@@ -514,19 +514,22 @@
 rvest()%7B
+%0D
 %0A%09%09
+//
 return (
@@ -578,13 +578,63 @@
 CK);
+%0D%0A%09%09return (this != PLAYER && this != MONSTER);%0D
 %0A%09%7D
+%0D
 %0A%09
+%0D
 %0A%09pu
@@ -657,19 +657,21 @@
 source()
+%0D
 %0A%09%7B
+%0D
 %0A%09%09switc
@@ -681,12 +681,14 @@
 his)
+%0D
 %0A%09%09%7B
+%0D
 %0A%09%09c
@@ -696,16 +696,17 @@
 se TREE:
+%0D
 %0A%09%09%09retu
@@ -714,32 +714,33 @@
 n Resource.WOOD;
+%0D
 %0A%09%09case BUSH:%0A%09%09
@@ -736,16 +736,17 @@
 se BUSH:
+%0D
 %0A%09%09%09retu
@@ -763,16 +763,17 @@
 e.BERRY;
+%0D
 %0A%09%09case 
@@ -777,16 +777,17 @@
 se ROCK:
+%0D
 %0A%09%09%09retu
@@ -804,16 +804,17 @@
 e.STONE;
+%0D
 %0A%09%09case 
@@ -823,16 +823,17 @@
 LL_WOOD:
+%0D
 %0A%09%09%09retu
@@ -849,16 +849,17 @@
 ce.WOOD;
+%0D
 %0A%09%09case 
@@ -869,16 +869,17 @@
 L_STONE:
+%0D
 %0A%09%09%09retu
@@ -902,16 +902,17 @@
 E_BRICK;
+%0D
 %0A%09%09defau
@@ -914,16 +914,17 @@
 default:
+%0D
 %0A%09%09%09retu
@@ -935,14 +935,18 @@
 ull;
+%0D
 %0A%09%09%7D
+%0D
 %0A%09%7D
+%0D
 %0A%7D
+%0D
 %0A

Return value changes