/**
 * Component.java
 * @author Neil Aggarwal
 */
package com.propfinancing.puzzle.slitherlink;

import java.io.Serializable;

/**
 * Base class for puzzle components
 */
public abstract class Component implements Serializable {
  /** The serialization version */
  private static final long serialVersionUID = 1L;

  /** The puzzle which contains this component */
  private Puzzle puzzle;
  
  /** The index of this component */
  private int index = 0;
  
  /** Default constructor */
  public Component() {   
  }
  
  /**
   * @return the puzzle
   */
  public Puzzle getPuzzle() {
    return puzzle;
  }

  /**
   * @param puzzle the puzzle to set
   */
  protected void setPuzzle(Puzzle puzzle) {
    this.puzzle = puzzle;
  }

  /**
   * @return the index
   */
  public int getIndex() {
    return index;
  }
  
  /** Set the index */
  void setIndex(int index) {
    this.index = index;
  }
}
