Android Open Source - Briscola Call Card Cups Select Activity






From Project

Back to project page Briscola.

License

The source code is released under:

GNU General Public License

If you think the Android project Briscola 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.gmail.craptik.briscola;
//from   w  ww  .j ava  2s  . c  o  m
import android.app.Activity;
import android.os.Bundle;
import android.view.View;

public class CallCardCupsSelectActivity extends Activity
{
  @Override
  protected void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_call_card_cups_select);
  }

  public void onCardClicked(View view)
  {
    GameData gameData = NewGameActivity.getGameData();

    switch(view.getId())
    {
      case R.id.call_card_cups_ace:
      {
        gameData.getCalledCard().setNumber(ECardNumber.ACE);
        break;
      }
      case R.id.call_card_cups_three:
      {
        gameData.getCalledCard().setNumber(ECardNumber.THREE);
        break;
      }
      case R.id.call_card_cups_king:
      {
        gameData.getCalledCard().setNumber(ECardNumber.KING);
        break;
      }
      case R.id.call_card_cups_horse:
      {
        gameData.getCalledCard().setNumber(ECardNumber.HORSE);
        break;
      }
      case R.id.call_card_cups_queen:
      {
        gameData.getCalledCard().setNumber(ECardNumber.QUEEN);
        break;
      }
      case R.id.call_card_cups_seven:
      {
        gameData.getCalledCard().setNumber(ECardNumber.SEVEN);
        break;
      }
      case R.id.call_card_cups_six:
      {
        gameData.getCalledCard().setNumber(ECardNumber.SIX);
        break;
      }
      case R.id.call_card_cups_five:
      {
        gameData.getCalledCard().setNumber(ECardNumber.FIVE);
        break;
      }
      case R.id.call_card_cups_four:
      {
        gameData.getCalledCard().setNumber(ECardNumber.FOUR);
        break;
      }
      case R.id.call_card_cups_two:
      {
        gameData.getCalledCard().setNumber(ECardNumber.TWO);
        break;
      }
      default:
      {
        // Need to handle every case here...
        assert false;
        break;
      }
    }

    setResult(RESULT_OK);
    finish();
  }
}




Java Source Code List

com.gmail.craptik.briscola.ActionAdapter.java
com.gmail.craptik.briscola.ActionItem.java
com.gmail.craptik.briscola.CallCardCupsSelectActivity.java
com.gmail.craptik.briscola.CallCardFeathersSelectActivity.java
com.gmail.craptik.briscola.CallCardSuitSelectActivity.java
com.gmail.craptik.briscola.CallCardSunsSelectActivity.java
com.gmail.craptik.briscola.CallCardSwordsSelectActivity.java
com.gmail.craptik.briscola.CalleeSelectActivity.java
com.gmail.craptik.briscola.CallerBidSelectActivity.java
com.gmail.craptik.briscola.Card.java
com.gmail.craptik.briscola.ECardNumber.java
com.gmail.craptik.briscola.ECardSuit.java
com.gmail.craptik.briscola.EGameProgress.java
com.gmail.craptik.briscola.FirstNemesisSelectActivity.java
com.gmail.craptik.briscola.GameData.java
com.gmail.craptik.briscola.IDatabase.java
com.gmail.craptik.briscola.MainActivity.java
com.gmail.craptik.briscola.NewGameActivity.java
com.gmail.craptik.briscola.PlayerAdapter.java
com.gmail.craptik.briscola.Player.java
com.gmail.craptik.briscola.PlayersSelectActivity.java
com.gmail.craptik.briscola.SQLGameDatabase.java
com.gmail.craptik.briscola.ScoreSelectActivity.java
com.gmail.craptik.briscola.TestDatabase.java