/*
 * MyFirst solo Project Spring 2014
 * Matching Card Game
 */

package model;

/**
 * This class's purpose is to store information about a matching status of two cards.
 * 
 * @author Brian Dennis
 * @version 3-26-2014
 */
public class MatchingStatus {
    
    /** This is the index where the card is located in the List<Card> ArrayList located in the
     *  MatchingGame class. */
    private int myIndex1;
    
    /** This is the index where the card is located in the List<Card> ArrayList located in the
     *  MatchingGame class. */
    private int myIndex2;
    
    /** this is the boolean holding the status of if the cards match or not. */
    private boolean myStatus;
    
    /** An integer that reports how many turns have been taken. */
    private int myTurnsTaken;
    
    /** An integer that reports how many matches have been made. */
    private int myMatchesMade;
    
    /** An integer that reports how many matches are left. */
    private int myMatchesLeft;
    
    /** 
     * This constructor initializes the variables to defaults.
     */
    public MatchingStatus() {
        
        myIndex1 = 0;
        myIndex2 = 0;
        myStatus = false;
        myTurnsTaken = 0;
        myMatchesMade = 0;
        myMatchesLeft = 26;
    }
    
    /**
     * sets the index of the first card in question.
     * 
     * @param theNewIndex1 index where the cards is located
     */
    public void setIndex1(final int theNewIndex1) {
        
        myIndex1 = theNewIndex1;
    }
    
    /**
     * sets the index of the second card in question.
     * 
     * @param theNewIndex2 index where the cards is located
     */
    public void setIndex2(final int theNewIndex2) {
        
        myIndex2 = theNewIndex2;
    }
    
    /**
     * sets the status of the card in question.
     * 
     * @param theNewStatus status of whether the cards match
     */
    public void setStatus(final boolean theNewStatus) {
        
        myStatus = theNewStatus;
    }
    
    /**
     * This method increments the myMatchesMade when a match is made.
     */
    public void incrementMatchesMade() {
        
        myMatchesMade++;
    }
    
    /**
     * increments myTurnsTaken once every turn. 
     */
    public void incrementTurnsTaken() {
        
        myTurnsTaken++;
    }
    
    /**
     * decrements myMatchesLeft when a match is made. 
     */
    public void decrementMatchesLeft() {
        
        myMatchesLeft--;
    }
    
    /**
     * returns the index of the first card in question.
     * 
     * @return the index of where the card is located
     */
    public int getIndex1() {
        
        return myIndex1;
    }
    
    /**
     * returns the index of the second card in question.
     * 
     * @return the index of where the card is located
     */
    public int getIndex2() {
        
        return myIndex2;
    }
    
    /**
     * returns the status of whether the cards match.
     * 
     * @return the status of the matching cards
     */
    public boolean myCardsMatch() {
        
        return myStatus;
    }
    
    /**
     * @return how many turns have gone by
     */
    public int getTurnsTaken() {
        
        return myTurnsTaken;
    }
    
    /**
     * @return how many matches have been made
     */
    public int getMatchesMade() {
        
        return myMatchesMade;
    }
    
    /**
     * @return how many matches have been made
     */
    public int getMatchesLeft() {
        
        return myMatchesLeft;
    }
}