Skip to main content
3 of 3
edited body
feersum
  • 31.5k
  • 9
  • 65
  • 125

Scoring Briscola

Introduction

Briscola is one of Italy's most popular card games. It is a trick-taking card game, like Bridge. Briscola is well known for its bizarre point system. In this challenge, given two cards, you will output whether the first one scores more, less, or the same number of points as the second in Briscola's point system.

Challenge

Briscola is played with a deck of Italian playing cards. There are forty cards in a deck, 1-10 in each of the four suits: cups, swords, clubs, and coins. We will be ignoring the suits for this challenge. Cards 2 - 7 are the numeric cards, and cards 8, 9, and 10 are the face cards. The ranking of the cards, from highest to lowest, are:

 +------------------------+-------------+
 |     Cards, by Rank     | Point Value |
 +------------------------+-------------+
 | Ace (1)                |     11      |
 | Three (3)              |     10      |
 | King (10)              |      4      |
 | Knight (9)             |      3      |
 | Jack (8)               |      2      |
 | Numeric Cards (2, 4-7) |      0      |
 +------------------------+-------------+

Thanks to Orphevs for the nice table! :)

Your task is to create a full program or function which accepts two numbers 1-10 representing card ranks, and outputs (or returns) whether the point value of the first card is greater than, lesser than, or equal to the point value of the second card. Additional Notes:

  • Your program may output any three values to indicate less than, greater than, and equal to, however, it must output the same value for each condition each time.

  • Your program may use any IO defaults.

  • Standard loopholes are disallowed.

  • Either a full function or a program is permitted.

  • This question is , so lowest byte-count wins.

  • Here are some sample inputs and outputs:

     1, 4 => more than (ace scores 11 points, 4 scores 0 points, first is  more than second.
       8, 3 => less than (8 scores 2, 3 scores 10, first is less than second.
       5, 2 => equal (5 and 2 both score 0)

If you have any questions, don't hesitate to ask. Good luck!

Amphibological
  • 1.6k
  • 1
  • 13
  • 24