Back to project page android-checkers-app.
The source code is released under:
Apache License
If you think the Android project android-checkers-app 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 edu.unlv.sudo.checkers.model; //from ww w. j a va 2 s . c o m import org.codehaus.jackson.annotate.JsonCreator; import org.codehaus.jackson.annotate.JsonProperty; /** * Represents a checkers piece */ public class Piece { private boolean king; private Team team; private Location location; @JsonCreator public Piece(@JsonProperty("team") final Team team, @JsonProperty("location") final Location location) { this.team = team; this.location = location; this.king = false; } public boolean isKing() { return king; } public Team getTeam() { return team; } public Location getLocation() { return location; } void makeKing() { this.king = true; } void setLocation(final Location location) { this.location = location; } }