title: Negative value converted to its positive counter part
body: <p>I am writing code for the game "craps".</p>
  
  <p>I have an if statement. The variable that I am using in the if statement is returned from the is_win_or_loss_or_point(dice_sum). This function returns 1 if the sum is 7 or 11. It returns 0 if the sum is 2,3 or 12. If not one of those values it returns -1.</p>
  
  <p>When I get a sum that causes it to return -1 (i.e. 6) point_value is assigned the value -1. point_value keeps its value of -1 when it hits the if (point_value == 0). But when it hits the else if (point_value == 1) it does something(in debugging it goes to positive 1) and then continues to go through the else if instead of continuing to the else statement.</p>
  
  <pre><code>int main()
  {
  balance=get_bank_balance();
  
  while (balance &gt; 0)
  {
  wager=get_wager_amount();
  
  wager=check_wager_amount(wager,balance);
  printf("Wager %.2lf\n",wager);
  
  roll1=roll_dice();
  roll2=roll_dice();
  
  dice_sum=calculate_sum_dice(roll1,roll2);
  
  point_value=is_win_loss_or_point(dice_sum);
  
  if (point_value == 0)
  {
      printf("You lose\n");
      new_balance=adjust_bank_balance(balance,wager,point_value);
      printf("Your current balance is %.2lf\n",new_balance);
  }
  else if (point_value = 1) // **point of interest**
  {
      printf("You win\n");
      new_balance=adjust_bank_balance(balance,wager,point_value);
      printf("Your current balance is %.2lf\n",new_balance);
  }
  else 
  {
      roll3=roll_dice();
      roll4=roll_dice();
  
      dice_sum2=calculate_sum_dice(roll3,roll4);
  
      point_loss=is_point_loss_or_neither(dice_sum2,dice_sum);
  
      new_balance=adjust_bank_balance(balance,wager,point_loss);
  
      printf("Your current balance is %.2lf\n",new_balance);
  }
  balance=new_balance;
  
  }
  
  }
  </code></pre>
  
  <p>Feel free to ask for additional info if I have missed something.</p>