Android Open Source - Briscola Test Database






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  ww w  . j a v  a  2  s.c o  m
import java.util.ArrayList;

public class TestDatabase implements IDatabase
{
  private ArrayList<Player> players;

  TestDatabase()
  {
    players = new ArrayList<Player>();

    players.add(new Player(0, "Patrick", 256));
    players.add(new Player(1, "Nemesis", -56));
    players.add(new Player(2, "Art", 0));
    players.add(new Player(3, "Dan", 7));
    players.add(new Player(4, "J", 10));
    players.add(new Player(5, "Eric", 34));
    players.add(new Player(6, "Christina", -400));
    players.add(new Player(7, "Grace", 99999));
    players.add(new Player(8, "Colton", 235));
    players.add(new Player(9, "Fang", 32));
    players.add(new Player(10, "Tony", -2));
    players.add(new Player(11, "Radu", 0));
  }

  TestDatabase(TestDatabase database)
  {
    this.players = new ArrayList<Player>(database.players);
  }

  @Override
  public void logGame(GameData data)
  {

  }

  @Override
  public void addNewPlayer(String name)
  {

  }

  @Override
  public void updatePlayer(Player player)
  {

  }

  @Override
  public void removePlayer(Player player)
  {

  }

  @Override
  public void resetDatabase()
  {

  }

  @Override
  public ArrayList<Player> getAllPlayers()
  {
    return players;
  }

  @Override
  public int getPlayerCount()
  {
    return players != null ? players.getCount() : 0;
  }

  @Override
  public ArrayList<GameData> getAllGames()
  {
    return new ArrayList<GameData>();
  }

  @Override
  public int getGameCount()
  {
    return 0;
  }
}




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