Monday, December 22, 2025

Gemini discussion on tritones (F# only or a block of 7 in the key of C major?)

This is a crucial turning point in our understanding of the tritone. To answer your question—how does a block of notes find relief?—we have to look at how a "zone of tension" collapses into a "zone of rest." If your F# is a single point of impact (the bullet), the F-B block is the pressure wave. 1. The Geometry of the "Collapse" When you have a block of notes like F-G-A-B, you aren't just looking at seven chromatic semitones (F, F#, G, G#, A, A#, B). You are looking at two "magnetic" poles at the edges of that block. In the key of C major: The Top Edge (B): This is the "Leading Tone." It is mathematically desperate to move up to C. The Bottom Edge (F): This is the 4th degree. It has a heavy gravitational pull downward to E. The "relief" for the block occurs when the two edges of the block move in contrary motion (moving away from or toward each other) to land on a stable interval. 2. The "Passing" Nature of the Block You mentioned the tritone is a "passing tone." If we treat the whole F-B block as a "passing state," the resolution looks like this: Tension: The block F−G−A−B creates a dissonant "cloud." Resolution: The block "squeezes" shut. The F drops to E, and the B jumps to C. The Result: You land on the interval E and C, which are the primary "home" notes of C Major. The "7 chromatic notes" inside that block are essentially the friction you feel as you move from the start of the climax to the end. They don't each resolve individually; they are the "body" of the tension that dissipates once the edges (F and B) find their home. 3. Why the "Block" supports your F# Theory Think of it this way: Your F# is the exact center of that block. If the block is a rubber band stretched between F and B, F# is the midpoint. When the rubber band is released, the energy passes through that F# midpoint as it snaps back to the stable notes (E and C). Aristoxenus would argue that the "relief" isn't just found in the notes themselves, but in the functional shift of the whole space. The "three-tone" space is an area of "active" energy that "passes" into a "passive" or "rested" space.

Tuesday, December 2, 2025

Tonic vs. Root

12/2 Working on a study between knight and king in games (any configuration for now, any move or position). King has to be one of them. Or does it? In music we often drop the root. I asked what the two most important pieces in a chess game analysis were. 1st inning (playing baseball, chess, and music) Gemini answered knight and bishop, forgetting a king is needed. 2nd try, it then went to knight and rook. 3rd try, it reversed the order to rook and knight. (Still the same thing.) 4th try, pawn and king. "Is this closer to your idea? By focusing on the Pawn (Unit of Time/Rhythm) and the King (Harmonic Anchor/Key), we establish the most fundamental and universally essential patterns in both the game and music." Sounds like a good conclusion, but not what I was loooking for. I asked again. 5th try, it then suggested rook with bishop (not recognizing a king is still needed in chess). I gave it three strikes then it was out, on the third strike it did bring up the queen with bishop (referencing their diagonal moves). Middle game analysis is more pertinent here, but bringing out the queen needs more careful consideration. Earlier on, queen trades would happen. 2nd inning I asked Gemini which the scariest moves in the beginning were and which piece it feared the most. It mentioned bishop. I thought the same until I learned about the bishop pair. I would always trade off a bishop before knight. My ignorance told me knights can go on all the squares, one bishop can't. Therefore, 2 knights are stronger than 2 bishops. To make it more absurd, I would trade off the LSB in the Philidor Defense just so I would have the "advantage". 3rd inning Root vs. Tonic

Saturday, October 4, 2025

Chessmusic 1 (2025)

Using Gemini to work on combining chess with music. That's the final, crucial step in defining your Chess Harmony Framework! To accurately capture the complexity of the Nf3 opening, the "minor/modal" change is best described as a combination of chords and modal choices, specifically focusing on Parallel Minor and Suspended/Modal chords. Here is the proposed method for mapping the Nf3 opening: Describing the Nf3 "Minor/Modal" Change The most effective musical description is to use a progression that starts suspended/modal and then transposes into one of the main functional harmonies (C Major or C Minor) based on Black's reply. 1. The Starting Chord: Suspended/Flexible The initial move 1.Nf3 should be mapped to a chord that is non-committal about being Major or Minor, reflecting the strategic flexibility of the move: Chord Choice: Csus4 (C-F-G) or Csus2 (C-D-G). Reasoning: These are the ideal flexible/suspended harmonies. They contain the root (C) and the 5th (G) but replace the 3rd (E or E♭) with a neighboring note, leaving the Major/Minor quality unresolved. This perfectly matches White's plan: develop a piece, control the center, and wait for Black to decide the nature of the fight. 2. The Transposition: Mode/Scale Change The scale or mode only becomes defined after Black forces White to commit to a central plan (e4 or d4): Scenario A: Black Allows e4 Transposition (Major Key) Chess: If Black's moves allow White to play e4 favorably (e.g., in the favorable lines of 1.Nf3e5), the harmony resolves to C Major. Musical Change: Csus4→Cmaj7 (Resolution to the Tonic) → The progression continues in the C Ionian (Major) scale: I→IV→V. Scenario B: Black Forces d4 Transposition (Parallel Minor Key) Chess: If Black plays solid moves like 1...d5 or 1...Nf6, White often follows up with c4 and g3, entering a closed Queen's Gambit or Indian Defense structure. Musical Change: Csus4→Cmin7 (Resolution to the Minor Tonic) → The progression continues using the C Parallel Minor scale (natural, harmonic, or melodic minor) for the chords i→iv→V. 3. Avoiding Extreme Modes While C Phrygian (like D♭-C) is a mode of the A♭ Major scale, it's too exotic and highly dissonant to represent a sound, flexible chess opening. The goal is to capture strategic stability while being non-committal, which is why Suspended Harmony is a better fit than extreme modal dissonance. The final map for your Nf3 opening is therefore: 1.Nf3 → Csus4 → Follows Black’s Move → C Major (e4) OR C Minor (d4) It starts with an ambiguous chord, and the scale is chosen by the opponent's reply.

Sunday, January 26, 2025

Random Image

/*HTML
*/ function loadRandomPicture() { // Array of 10 possible picture file names const imageFiles = [ "image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg", "image8.jpg", "image9.jpg", "image10.jpg" ]; // Generate a random index within the range of the array const randomIndex = Math.floor(Math.random() * imageFiles.length); // Get the randomly selected file name const randomImage = imageFiles[randomIndex]; // Create an image element const img = new Image(); // Set the source of the image element img.src = randomImage; // Add an event listener to handle image loading img.onload = () => { // Once the image is loaded, display it (e.g., in an HTML element) document.getElementById("image-container").appendChild(img); }; // Add an event listener to handle image loading errors img.onerror = () => { console.error(`Error loading image: ${randomImage}`); // Handle the error (e.g., display an error message) }; } // Call the function to load a random picture loadRandomPicture();

Thursday, January 9, 2025

Jukebox

Saturday, October 26, 2024

Euchre (Card Game) - Starting the bidding process


The code below starts the bidding process. It's possible now to add graphics, that might be next as well as continuing with picking up. 

Can be tested at https://www.onlinegdb.com/online_python_compiler

#This is to evaluate dealt cards for all four players.
import random

player_num = random.randint(0,3) #Assigns players a number.
suits = ["clubs", "spades", "diamonds", "hearts"]
trump_order = []
cnums_dealt = []
cards = ["9♣", "10♣", "J♣", "Q♣", "K♣", "A♣", "9♠", "10♠", "J♠", "Q♠", "K♠", "A♠", "9♦", "10♦", "J♦", "Q♦", "K♦", "A♦", "9♥", "10♥", "J♥", "Q♥", "K♥", "A♥"]
cards2 = ["9♣", "10♣", "J♣", "Q♣", "K♣", "A♣", "9♠", "10♠", "J♠", "Q♠", "K♠", "A♠", "9♦", "10♦", "J♦", "Q♦", "K♦", "A♦", "9♥", "10♥", "J♥", "Q♥", "K♥", "A♥"]
cnums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
cnumscopy = cnums.copy() #This is for second round bidding.
cnums_value = []
cardsnum_dealt = 23


#Generating cards dealt out
for x in range (21):
    cards_dealt = (random.randint(0,cardsnum_dealt))
    if len (cnums) == 4:
        cnums_number = cnums[cards_dealt]
    trump_order.append(cards[cards_dealt])
    cnums_dealt.append(cnums[cards_dealt])
    cardsnum_dealt = cardsnum_dealt - 1
    cards.pop(cards_dealt)
    cnums.pop(cards_dealt)
#print ("trump order ", trump_order)
#print ("cnums_dealt ", cnums_dealt)
print ("\nThe card the dealer turned over was", trump_order[20])

#Assigning values to each card
if cnums_dealt[20] < 6:  
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be clubs.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 6 or cnums_dealt[card_num] == 12 or cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 7 or cnums_dealt[card_num] == 13 or cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 14 or cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 9 or cnums_dealt[card_num] == 15 or cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] == 10 or cnums_dealt[card_num] == 16 or cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 11 or cnums_dealt[card_num] == 17 or cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 0:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 1:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 2:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 3:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 4:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 5:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 12

   suitbid = 5 #filter for clubs in second bid round
   secondsuitbid = 0
    
 #print ("New cnums_dealtcopy", cnums_dealtcopy)
 


if cnums_dealt[20] > 5 and cnums_dealt[20] < 12:
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be spades.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 0 or cnums_dealt[card_num] == 12 or cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 1 or cnums_dealt[card_num] == 13 or cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 14 or cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 3 or cnums_dealt[card_num] == 15 or cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] ==  4 or cnums_dealt[card_num] == 16 or cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 5 or cnums_dealt[card_num] == 17 or cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 6:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 7:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 9:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 10:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 11:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 2:
    cnums_dealtcopy[card_num] = 12

   suitbid = 11 #filter for spades in second bid round
   secondsuitbid = 1

 #print ("New cnums_dealtcopy", cnums_dealtcopy)


 
if cnums_dealt[20] > 11 and cnums_dealt[20] < 18:
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be diamonds.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 0 or cnums_dealt[card_num] == 6 or cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 1 or cnums_dealt[card_num] == 7 or cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 2 or cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 3 or cnums_dealt[card_num] == 9 or cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] ==  4 or cnums_dealt[card_num] == 10 or cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 5 or cnums_dealt[card_num] == 11 or cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 12:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 13:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 14:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 15:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 16:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 17:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 12

   suitbid = 17 #filter for diamonds in second bid round
   secondsuitbid = 2

 #print ("New cnums_dealtcopy", cnums_dealtcopy)

     
if cnums_dealt[20] > 17 and cnums_dealt[20] < 24:
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be hearts.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 0 or cnums_dealt[card_num] == 6 or cnums_dealt[card_num] == 12:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 1 or cnums_dealt[card_num] == 7 or cnums_dealt[card_num] == 13:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 2 or cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 3 or cnums_dealt[card_num] == 9 or cnums_dealt[card_num] == 15:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] ==  4 or cnums_dealt[card_num] == 10 or cnums_dealt[card_num] == 16:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 5 or cnums_dealt[card_num] == 11 or cnums_dealt[card_num] == 17:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 14:
    cnums_dealtcopy[card_num] = 12

   suitbid = 23 #filter for hearts in second bid round
   secondsuitbid = 3
    
 #print ("New cnums_dealtcopy", cnums_dealtcopy)


player1 = trump_order[0], trump_order[4], trump_order[8], trump_order[12], trump_order[16]
player2 = trump_order[1], trump_order[5], trump_order[9], trump_order[13], trump_order[17]
player3 = trump_order[2], trump_order[6], trump_order[10], trump_order[14], trump_order[18]
player4 = trump_order[3], trump_order[7], trump_order[11], trump_order[15], trump_order[19]

player1_bidding_points = cnums_dealtcopy[0]+cnums_dealtcopy[4]+cnums_dealtcopy[8]+cnums_dealtcopy[12]+cnums_dealtcopy[16]
player2_bidding_points = cnums_dealtcopy[1]+cnums_dealtcopy[5]+cnums_dealtcopy[9]+cnums_dealtcopy[13]+cnums_dealtcopy[17]
player3_bidding_points = cnums_dealtcopy[2]+cnums_dealtcopy[6]+cnums_dealtcopy[10]+cnums_dealtcopy[14]+cnums_dealtcopy[18]
player4_bidding_points = cnums_dealtcopy[3]+cnums_dealtcopy[7]+cnums_dealtcopy[11]+cnums_dealtcopy[15]+cnums_dealtcopy[19]

#print("\nPlayer 1: ",player1, "\nbidding points =", player1_bidding_points)
#print("\nPlayer 2: ",player2, "\nbidding points =", player2_bidding_points)
#print("\nPlayer 3: ",player3, "\nbidding points =", player3_bidding_points)
#print("\nPlayer 4: ",player4, "\nbidding points =", player4_bidding_points)
print("You are player", player_num+1, "\n")

#Is there another way to isolate a player's assignment? This makes them part of a list and can be referenced by position in the list.
playerlist = [player1, player2, player3, player4]
print("Your cards are:", playerlist[player_num])

#Passing or Picking up

for playerbid in range (4):
 #print ("player bid = ", playerbid)
 while playerbid+1 != player_num+1:
  print ("Player ",playerbid+1," will pass.")
  break
 if playerbid+1 == player_num+1 and playerbid+1 !=4:
  bidpickup = input("\nWill you pass or tell the dealer to pick up? Type \'skip' to pass or 'pick up'.\n\n")
  if bidpickup == "pick up":
   print("Will be programmed later, using skip for now.")
if player_num+1 == 4:
 dealerbid = input("\nYou are the dealer. Do you want to pick up \nor pass and go to a second round of bidding?\nType \'skip' to pass or 'pick up'.\n\n")

#print ("suit bid# is ", suitbid)
#print ("cnums is", cnumscopy)
for passbidsuit in range (6):
 cnumscopy.pop(cnumscopy[suitbid-passbidsuit])
#print ("cnums filtered is", cnumscopy)


suits.pop(secondsuitbid)

callsuit = "on"
while callsuit == "on":
 bidpasscall = input("\nWill you pass again or call a suit? Type \'skip' or 'call'.\n")   
 if bidpasscall == ("call"):
  print("\nThree suits left are:",suits)
  callbid = input("Choose one of the suits. \n")
  if callbid == suits[0] or callbid == suits[1] or callbid == suits[2]:
   callsuit = "off"
 elif bidpasscall == ("skip"): #Using else doesn't work here.
  print ("\nMore to be programmed later, call a suit for now.")

print("\nTrump will be", callbid)

Monday, September 30, 2024

Euchre (Card Game) - Placing values based on card turned over

The code below places values based on the card turned over. Next will be to add bidding and including dealer's (player 4) advantage taking the card. Can be tested at https://www.online-python.com/

#This is to evaluate dealt cards for all four players.

import random

trump_order = []
cnums_dealt = []
cards = ["9♣", "10♣", "J♣", "Q♣", "K♣", "A♣", "9♠", "10♠", "J♠", "Q♠", "K♠", "A♠", "9♦", "10♦", "J♦", "Q♦", "K♦", "A♦", "9♥", "10♥", "J♥", "Q♥", "K♥", "A♥"]
cards2 = ["9♣", "10♣", "J♣", "Q♣", "K♣", "A♣", "9♠", "10♠", "J♠", "Q♠", "K♠", "A♠", "9♦", "10♦", "J♦", "Q♦", "K♦", "A♦", "9♥", "10♥", "J♥", "Q♥", "K♥", "A♥"]
cnums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
cnums_value = []
cardsnum_dealt = 23


#Generating cards dealt out
for x in range (21):
    cards_dealt = (random.randint(0,cardsnum_dealt))
    if len (cnums) == 4:
        cnums_number = cnums[cards_dealt]
    trump_order.append(cards[cards_dealt])
    cnums_dealt.append(cnums[cards_dealt])
    cardsnum_dealt = cardsnum_dealt - 1
    cards.pop(cards_dealt)
    cnums.pop(cards_dealt)
#print ("trump order ", trump_order)
#print ("cnums_dealt ", cnums_dealt)
print ("\nThe card the dealer turned over was", trump_order[20])

#Assigning values to each card
if cnums_dealt[20] < 6:
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be clubs.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 6 or cnums_dealt[card_num] == 12 or cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 7 or cnums_dealt[card_num] == 13 or cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 14 or cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 9 or cnums_dealt[card_num] == 15 or cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] == 10 or cnums_dealt[card_num] == 16 or cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 11 or cnums_dealt[card_num] == 17 or cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 0:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 1:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 2:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 3:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 4:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 5:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 12
    
 #print ("New cnums_dealtcopy", cnums_dealtcopy)
 


if cnums_dealt[20] > 5 and cnums_dealt[20] < 12:
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be spades.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 0 or cnums_dealt[card_num] == 12 or cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 1 or cnums_dealt[card_num] == 13 or cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 14 or cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 3 or cnums_dealt[card_num] == 15 or cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] ==  4 or cnums_dealt[card_num] == 16 or cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 5 or cnums_dealt[card_num] == 17 or cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 6:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 7:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 9:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 10:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 11:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 2:
    cnums_dealtcopy[card_num] = 12

 #print ("New cnums_dealtcopy", cnums_dealtcopy)


 
if cnums_dealt[20] > 11 and cnums_dealt[20] < 18:
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be diamonds.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 0 or cnums_dealt[card_num] == 6 or cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 1 or cnums_dealt[card_num] == 7 or cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 2 or cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 3 or cnums_dealt[card_num] == 9 or cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] ==  4 or cnums_dealt[card_num] == 10 or cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 5 or cnums_dealt[card_num] == 11 or cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 12:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 13:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 14:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 15:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 16:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 17:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 12

 #print ("New cnums_dealtcopy", cnums_dealtcopy)

     
if cnums_dealt[20] > 17 and cnums_dealt[20] < 24:
 cnums_dealtcopy = cnums_dealt.copy()
 #print("cnums_dealtcopy:", cnums_dealtcopy)
 #print("Trump could be hearts.")
 for value in range (13):
  for card_num in range (21):
   if cnums_dealt[card_num] == 0 or cnums_dealt[card_num] == 6 or cnums_dealt[card_num] == 12:
    cnums_dealtcopy[card_num] = 1
   if cnums_dealt[card_num] == 1 or cnums_dealt[card_num] == 7 or cnums_dealt[card_num] == 13:
    cnums_dealtcopy[card_num] = 2
   if cnums_dealt[card_num] == 2 or cnums_dealt[card_num] == 8:
    cnums_dealtcopy[card_num] = 3
   if cnums_dealt[card_num] == 3 or cnums_dealt[card_num] == 9 or cnums_dealt[card_num] == 15:
    cnums_dealtcopy[card_num] = 4
   if cnums_dealt[card_num] ==  4 or cnums_dealt[card_num] == 10 or cnums_dealt[card_num] == 16:
    cnums_dealtcopy[card_num] = 5
   if cnums_dealt[card_num] == 5 or cnums_dealt[card_num] == 11 or cnums_dealt[card_num] == 17:
    cnums_dealtcopy[card_num] = 6
    
   if cnums_dealt[card_num] == 18:
    cnums_dealtcopy[card_num] = 7

   if cnums_dealt[card_num] == 19:
    cnums_dealtcopy[card_num] = 8

   if cnums_dealt[card_num] == 20:
    cnums_dealtcopy[card_num] = 13

   if cnums_dealt[card_num] == 21:
    cnums_dealtcopy[card_num] = 9

   if cnums_dealt[card_num] == 22:
    cnums_dealtcopy[card_num] = 10

   if cnums_dealt[card_num] == 23:
    cnums_dealtcopy[card_num] = 11

   if cnums_dealt[card_num] == 14:
    cnums_dealtcopy[card_num] = 12
    
 #print ("New cnums_dealtcopy", cnums_dealtcopy)


player1 = trump_order[0], trump_order[4], trump_order[8], trump_order[12], trump_order[16]
player2 = trump_order[1], trump_order[5], trump_order[9], trump_order[13], trump_order[17]
player3 = trump_order[2], trump_order[6], trump_order[10], trump_order[14], trump_order[18]
player4 = trump_order[3], trump_order[7], trump_order[11], trump_order[15], trump_order[19]

player1_bidding_points = cnums_dealtcopy[0]+cnums_dealtcopy[4]+cnums_dealtcopy[8]+cnums_dealtcopy[12]+cnums_dealtcopy[16]
player2_bidding_points = cnums_dealtcopy[1]+cnums_dealtcopy[5]+cnums_dealtcopy[9]+cnums_dealtcopy[13]+cnums_dealtcopy[17]
player3_bidding_points = cnums_dealtcopy[2]+cnums_dealtcopy[6]+cnums_dealtcopy[10]+cnums_dealtcopy[14]+cnums_dealtcopy[18]
player4_bidding_points = cnums_dealtcopy[3]+cnums_dealtcopy[7]+cnums_dealtcopy[11]+cnums_dealtcopy[15]+cnums_dealtcopy[19]

print("\n\nPlayer 1: ",player1, "\nbidding points =", player1_bidding_points)
print("\nPlayer 2: ",player2, "\nbidding points =", player2_bidding_points)
print("\nPlayer 3: ",player3, "\nbidding points =", player3_bidding_points)
print("\nPlayer 4: ",player4, "\nbidding points =", player4_bidding_points)