Android Open Source - ScoponeDaPolso Card






From Project

Back to project page ScoponeDaPolso.

License

The source code is released under:

GNU General Public License

If you think the Android project ScoponeDaPolso listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.gdg.bari.entities;
/*  w  ww  .  j  av a  2  s  .co m*/

import com.google.common.base.Objects;

public class Card {

    private int value;
    private String seed;
    //private Constants.SEEDS seed; //referred to Constants.SEED_<something>
    private String owner; //referred to player id
    private int status;


    //CONSTRUCTORS
    public Card(){

    }

    public Card(String seed, int value){
        this.seed = seed;
        this.value = value;
    }

    public Card(String seed, int value, String owner, int status){
        this.seed = seed;
        this.value = value;
        this.owner = owner;
        this.status = status;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    /*public Constants.SEEDS getSeed() {
        return seed;
    }*/

    public String getSeed() {
        return seed;
    }

    /*public void setSeed(Constants.SEEDS seed) {
        this.seed = seed;
    }*/

    public void setSeed(String seed) {
        this.seed = seed;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString(){
        return value + " di " + seed;
    }

    public int hashCode(){
        return Objects.hashCode(this.value, this.seed);
    }

    @Override
    public boolean equals(Object obj){

        boolean result = false;
        if(obj instanceof Card)
            if(obj == this)
                result = true;
        else if(this.getValue() == ((Card) obj).getValue() &&
                    this.getSeed().equals(((Card) obj).getSeed()))
                result = true;

        return result;
    }

}




Java Source Code List

com.google.example.games.basegameutils.BaseGameActivity.java
com.google.example.games.basegameutils.BaseGameUtils.java
com.google.example.games.basegameutils.GameHelperUtils.java
com.google.example.games.basegameutils.GameHelper.java
com.mariux.teleport.lib.ApplicationTest.java
com.mariux.teleport.lib.TeleportClient.java
com.mariux.teleport.lib.TeleportService.java
org.gdg.bari.entities.ApplicationTest.java
org.gdg.bari.entities.Card.java
org.gdg.bari.entities.Constants.java
org.gdg.bari.entities.Deck.java
org.gdg.bari.entities.Score.java
org.gdg.bari.entities.TableTurn.java
org.gdg.bari.entities.Table.java
org.gdg.bari.entities.TeleportClientManager.java
org.gdg.bari.scopone.ApplicationTest.java
org.gdg.bari.scopone.activity.MobileGameActivity.java
org.gdg.bari.scopone.activity.MobileMainActivity.java
org.gdg.bari.scopone.activity.WearConfirmationActivity.java
org.gdg.bari.scopone.activity.WearMainActivity.java
org.gdg.bari.scopone.fragment.CardListFragment.java
org.gdg.bari.scopone.fragment.GameFragment.java
org.gdg.bari.scopone.fragment.LoginFragment.java
org.gdg.bari.scopone.fragment.MenuFragment.java
org.gdg.bari.scopone.service.MobileTeleportService.java
org.gdg.bari.scopone.services.WearTeleportService.java
org.gdg.bari.scopone.util.GoogleApiClientManager.java
org.gdg.bari.scopone.util.LogUtil.java