Help with BGE redraw?

I have a script that selects 4 cards (named #1-10 and first letter of suit) from a deck and moves them to 4 points… The script works perfectly outside of BGE, but the game never refreshes when running. The screen glitches a moment but nothing moves, but when the game stops, the cards are even there.

Blender.Redraw() doesn’t work… what am I doing wrong?

import Blender as B
import random as rand

deck_loc = (0.0,-10.0,0.0)
suit = {"d":"Diamonds", "s":"Spades", "h":"Hearts", "c":"Clubs"}
switch_suit = {"d":"s", "s":"h","h":"c","c":"d"}
suit_number = {"1":"d","2":"s","3":"h","4":"c"}

object = B.Object.Get

############moves cards to start
for j in range (1,11) :
	card_num = str(j)
	for k in range (1,5) :
		
		card_suit = suit_number [str(k)]			
		card_ob = object(card_num + card_suit)
		card_ob.loc = deck_loc

###########chooses random number from 1-10 for each card "pt.x"
for i in range (11,15) :
	
	s = str(i)
	pt = object("pt." + s.zfill(3))
	rand_num = str(rand.randint(1, 10))	
	rand_suit = str(rand.sample(["d","s","h","c"],1)).strip("'[]")

############change suit for duples
	
	card_choice = object(rand_num + rand_suit)

		
	while card_choice.loc != deck_loc:
		rand_suit = switch_suit[rand_suit]
		card_choice = object(rand_num + rand_suit)

	card_choice.loc = pt.loc

B.Redraw(-1)


The BGE has its own API.

The Blender module is partially functional inside the BGE, but use of it should be avoided.

The BGE docs can be found here:
http://www.blender.org/documentation/249PythonDoc/GE/index.html

Getting an object in the BGE is done like this:

import GameLogic # already in namespace, not necessary to import

object = GameLogic.getCurrentScene().objects
for j in range(1,11):
    card_num = str(j)
    for k in range(1,5):
        card_suit = suit_number[str(k)]
        card_ob = object["OB" + card_num + card_suit]
        card_ob.position = deck_loc

Take note of the “OB” prefix when accessing the dictionary of objects.

I had a few issues with commands being different in the modules (e.g. loc vs. position,setPostion…etc.)

I’ve had this problem for so long.
THANK YOU VERY MUCH!!!