Android Open Source - android-tic-tac-toe Winning Combination






From Project

Back to project page android-tic-tac-toe.

License

The source code is released under:

MIT License

If you think the Android project android-tic-tac-toe 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.shaon.android.tictactoe.model;
//from w w w.ja v a2  s.  com
import org.shaon.android.tictactoe.model.State.Combination;

/**
 * Represents an winning combination. Each winning combination has
 * a bit vector value and a combination to mark which way game is 
 * own. This class is mainly used in time of calculating 
 * {@link TerminatingCondition} of a state.   
 * 
 * @author fahad
 */
public class WinningCombination {

  private int winningCase;
  private Combination combination;
  
  public WinningCombination(int winningCase, Combination combination) {
    super();
    this.winningCase = winningCase;
    this.combination = combination;
  }
  public int getWinningCase() {
    return winningCase;
  }
  public void setWinningCase(int winningCase) {
    this.winningCase = winningCase;
  }
  public Combination getCombination() {
    return combination;
  }
  public void setCombination(Combination combination) {
    this.combination = combination;
  }
}




Java Source Code List

org.shaon.android.tictactoe.TicTacToeApplication.java
org.shaon.android.tictactoe.activity.SettingsActivity.java
org.shaon.android.tictactoe.activity.TicTacToeActivity.java
org.shaon.android.tictactoe.board.Board.java
org.shaon.android.tictactoe.board.Cell.java
org.shaon.android.tictactoe.exception.InvalidTurn.java
org.shaon.android.tictactoe.model.ActionState.java
org.shaon.android.tictactoe.model.Action.java
org.shaon.android.tictactoe.model.AlphaBetaSearch.java
org.shaon.android.tictactoe.model.MinMax.java
org.shaon.android.tictactoe.model.PlayerConfig.java
org.shaon.android.tictactoe.model.SearchAlgorithm.java
org.shaon.android.tictactoe.model.State.java
org.shaon.android.tictactoe.model.TerminatingCondition.java
org.shaon.android.tictactoe.model.WinningCombination.java