|
@ -8,4 +8,32 @@ public class Cell { |
|
|
this.pos = pos; |
|
|
this.pos = pos; |
|
|
this.type = type; |
|
|
this.type = type; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void triggerDot() { |
|
|
|
|
|
//todo: code |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void triggerPill() { |
|
|
|
|
|
//todo: code |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void triggerFruit() { |
|
|
|
|
|
//todo: code |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void triggerItem() { |
|
|
|
|
|
if(type.equals("dot")) { |
|
|
|
|
|
triggerDot(); |
|
|
|
|
|
} |
|
|
|
|
|
else if(type.equals("pill")) { |
|
|
|
|
|
triggerPill(); |
|
|
|
|
|
} |
|
|
|
|
|
else if(type.equals("cherry")) { |
|
|
|
|
|
triggerFruit(); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
System.out.println("cell contains no item!"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |