Back to project page Freebloks-Android.
The source code is released under:
GNU General Public License
If you think the Android project Freebloks-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.saschahlusiak.freebloks.view.effects; //from ww w . j av a2 s . c o m import javax.microedition.khronos.opengles.GL10; import de.saschahlusiak.freebloks.model.Stone; import de.saschahlusiak.freebloks.view.BoardRenderer; import de.saschahlusiak.freebloks.view.model.ViewModel; public abstract class AbsStoneEffect extends AbsEffect implements Effect { Stone stone; int color, x, y; ViewModel model; AbsStoneEffect(ViewModel model, Stone stone, int color, int x, int y) { this.model = model; this.stone = stone; this.color = color; this.x = x; this.y = y; } @Override public boolean isEffected(int x, int y) { x = x - this.x; y = y - this.y; if (x < 0 || y < 0) return false; if (x >= stone.get_stone_size()) return false; if (y >= stone.get_stone_size()) return false; if (stone.get_stone_field(y, x) == Stone.STONE_FIELD_FREE) return false; return true; } @Override public void renderShadow(GL10 gl, BoardRenderer renderer) { } }