flip method

void flip()

Implementation

void flip() {
  int tempA = indexA;
  indexA = indexB;
  indexB = tempA;
  tempA = typeA;
  typeA = typeB;
  typeB = tempA;
}