1 /****************************************************************************
4 Copyright (c) 2001 Jerome Jacovella-St-Louis
7 player.ec - Poker Player Window
8 ****************************************************************************/
10 import "pokerUtils.ec"
12 static char handTypes[10][20] =
30 borderStyle = sizable;
48 void OnRedraw(Surface surface)
50 Poker poker = (Poker)master;
53 for(c=0; c<numDown; c++)
55 poker.DrawCard(surface, c*GAP, 0, (human || gameOver && !folded) ? POKER_Card(down[c]) : -1);
57 POKER_HandType(bestHand);
58 for(c=0; c<numUp; c++)
59 poker.DrawCard(surface, c*GAP, 40, folded ? -1 : POKER_Card(up[c]));
62 surface.SetForeground(blue);
63 surface.WriteTextf(10, 175, "FOLDED");
67 surface.SetForeground(red);
69 surface.WriteTextf(10, 175, "WINNER");
70 surface.SetForeground(blue);
71 surface.WriteTextf(80, 175, "%s", handTypes[handType]);
73 surface.SetForeground(white);
74 surface.WriteTextf(110, 155, "$%.2f", money / 2.0);