Android Open Source - game_guess_lib Guess Level






From Project

Back to project page game_guess_lib.

License

The source code is released under:

MIT License

If you think the Android project game_guess_lib 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 com.wkmf.guess.lib.structure;
//from   ww  w  .java 2 s .  c om
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;

import java.util.List;

/**
 * Created by ernestofndz on 9/02/14.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class GuessLevel {

    private static final int LEVEL_PRODUCTION = 1;
    private static final int LEVEL_COMPLETE_PRIZE = 5;
    @JsonProperty("id")
    private String id;
    @JsonProperty("stage")
    private String stage;
    @JsonProperty("difficulty")
    private int difficulty;
    @JsonProperty("name")
    private String name;
    @JsonProperty("questions")
    private List<GuessQuestion> questions;
    @JsonProperty("status")
    private boolean completed = false;
    @JsonProperty("level_type")
    private int levelType;
    @JsonProperty("production")
    private int production;

    // dificultades
    public static final int EASY = 1;
    public static final int MIDDLE = 2;
    public static final int HARD = 3;

    // constructor
    public GuessLevel(
            String id,
            String stage,
            int difficulty,
            String name,
            List<GuessQuestion> questions,
            boolean completed,
            int levelType,
            int production) {
        this.id = id;
        this.stage = stage;
        this.difficulty = difficulty;
        this.name = name;
        this.questions = questions;
        this.completed = completed;
        this.levelType = levelType;
        this.production = production;
    }

    public GuessLevel() {
    }

    // el premio al responder correctamente la pregunta depender de la dificultad de la misma
    public int getCorrectAnswerPrize() {
        return this.difficulty;
    }

    // el premio al completar un nivel es el mismo siempre (puede cambiar en el futuro)
    public int getLevelCompletePrize() {
        return LEVEL_COMPLETE_PRIZE;
    }

    // comprobar si un nivel se encuentra en produccin
    public boolean isInProduction() {
        return this.production == LEVEL_PRODUCTION;
    }

    // get/set
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public List<GuessQuestion> getQuestions() {
        return questions;
    }
    public void setQuestions(List<GuessQuestion> questions) {
        this.questions = questions;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getStage() {
        return stage;
    }
    public void setStage(String stage) {
        this.stage = stage;
    }
    public int getDifficulty() {
        return difficulty;
    }
    public void setDifficulty(int difficulty) {
        this.difficulty = difficulty;
    }
    public boolean isCompleted() {
        return completed;
    }
    public void setCompleted(boolean completed) {
        this.completed = completed;
    }
    public int getLevelType() {
        return levelType;
    }
    public void setLevelType(int levelType) {
        this.levelType = levelType;
    }
}




Java Source Code List

com.android.vending.billing.util.Base64DecoderException.java
com.android.vending.billing.util.Base64.java
com.android.vending.billing.util.IabException.java
com.android.vending.billing.util.IabHelper.java
com.android.vending.billing.util.IabResult.java
com.android.vending.billing.util.Inventory.java
com.android.vending.billing.util.Purchase.java
com.android.vending.billing.util.Security.java
com.android.vending.billing.util.SkuDetails.java
com.wkmf.guess.lib.common.Constants.java
com.wkmf.guess.lib.common.ads.GuessGameAdsListener.java
com.wkmf.guess.lib.common.ads.GuessGameAds.java
com.wkmf.guess.lib.common.api.GuessApi.java
com.wkmf.guess.lib.common.api.GuessRestApi.java
com.wkmf.guess.lib.common.async.DownloadTask.java
com.wkmf.guess.lib.common.dialog.DialogElement.java
com.wkmf.guess.lib.common.dialog.DialogModalListAdapter.java
com.wkmf.guess.lib.common.dialog.DialogModal.java
com.wkmf.guess.lib.data.GuessGameBDDHandler.java
com.wkmf.guess.lib.data.GuessSQL.java
com.wkmf.guess.lib.impl.GuessGameBaseApp.java
com.wkmf.guess.lib.impl.GuessGameImageDownload.java
com.wkmf.guess.lib.impl.GuessGameInterface.java
com.wkmf.guess.lib.purchase.items.GuessGameItems.java
com.wkmf.guess.lib.screen.GuessLevelScreen.java
com.wkmf.guess.lib.screen.GuessMainScreen.java
com.wkmf.guess.lib.screen.GuessQuestionScreen.java
com.wkmf.guess.lib.screen.adapter.LevelsAdapter.java
com.wkmf.guess.lib.screen.adapter.QuestionsAdapter.java
com.wkmf.guess.lib.service.GuessGameService.java
com.wkmf.guess.lib.service.GuessGameUpdater.java
com.wkmf.guess.lib.service.ServiceStarter.java
com.wkmf.guess.lib.structure.GuessConfig.java
com.wkmf.guess.lib.structure.GuessDrawable.java
com.wkmf.guess.lib.structure.GuessGame.java
com.wkmf.guess.lib.structure.GuessLevelType.java
com.wkmf.guess.lib.structure.GuessLevel.java
com.wkmf.guess.lib.structure.GuessQuestion.java