/*

 *

 * Name: Cory Chang Troy HS Intermediate 5

 

 */

import java.util.*;

 

public class ACSLIntermediateBridge{

 

 

  public ACSLIntermediateBridge() { }

 

  public String playRound(int bid, int tricksWon, String suit, String status) {

      int OverScore = 0;

      int UnderScore = 0;

      int temp = 0;

      if(suit.equals("T"))

      {

          temp = 40;

      }

      if(suit.equals("H") || suit.equals("S"))

      {

          temp = 30;

      }

      if(suit.equals("C") || suit.equals("D"))

      {

          temp = 20;

      }

      if(bid + 6 <= tricksWon)

      {

          if(temp != 40)

          {

              UnderScore += bid * temp;

          }

          else

          {

              UnderScore += 40 + ((bid - 1) * 30);

              temp = 30;

          }

          for(int i = 0; i < tricksWon - (bid + 6); i++)

          {

              OverScore += temp;

          }

      }

      else

      {

          if(status.equals("V"))

          {

              for(int i = 0; i < bid + 6 - tricksWon; i++)

              {

                  OverScore += 100;

              }

          }

          if(status.equals("N"))

          {

              for(int i = 0; i < bid + 6 - tricksWon; i++)

              {

                  OverScore += 50;

              }

          }

      }

      String answer = UnderScore + ", " + OverScore;

      return answer;

  }

 

}