Back to project page Do-not-get-annoyed.
The source code is released under:
Apache License
If you think the Android project Do-not-get-annoyed 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 mn100013d.pmu.models; //from w ww . ja v a 2s . c o m import java.io.Serializable; import mn100013d.pmu.R; import android.content.Context; import android.view.View; public class PathField extends Field implements Serializable{ protected PathField(Board board, View view, Context context) { super(board, view, context); // TODO Auto-generated constructor stub } @Override protected int getInitialStateImageId(int color) { return R.drawable.white_board_field; } @Override protected int getHighlightedStateImageId(int color) { return R.drawable.white_board_field_highlighted; } @Override protected int getOccupiedStateImageId(int color) { switch (color){ case Color.BLUE: return R.drawable.white_board_field_occupied_blue; case Color.RED: return R.drawable.white_board_field_occupied_red; case Color.YELLOW: return R.drawable.white_board_field_occupied_yelow; case Color.GREEN: return R.drawable.white_board_field_occupied_green; default: return -1; } } @Override protected int getAttackedStateImageId(int color) { switch (color){ case Color.BLUE: return R.drawable.blue_board_field_attacked; case Color.RED: return R.drawable.red_board_field_attacked; case Color.YELLOW: return R.drawable.yellow_board_field_attacked; case Color.GREEN: return R.drawable.green_board_field_attacked; default: return -1; } } }