This is a buffet! A few simple excuses! BOOL __FASTCALL Refresh (); Wrunage INT __FASTCALL GETBYINDEX (INT _INDEX); Book according to sequential parameters; Grefresh_card (int _CardNum = 54); initialization, _cardnum is the number of sheets, default 54; void free (); Used to release some necessary things; ansistring getusefully (int _index); true cardboard, colored! Code as follows:
/ / -------------------------------------------------------------------------------------------- ---------------------------
#pragma HDRSTOP
#include "refc.h" #include
#pragma package (smart_init) Grefresh_card :: ~ Grefresh_card () {// ¹¹ free ();
}
BOOL __FASTCALL GREFRESH_CARD :: Refresh () {// ï'åæ bool card_result = false; srand ((unsigned) Time (null)); // ô¼¼õõõ »ðð £ ¬¬ªæ ± × × ÷ ªªªæ» úêýööö × ó std: : random_shuffle (card-> begin (), card-> end (); return card_result;}
INT __FASTCALL GREFRESH_CARD :: GetByindex (int _index) {// äçåæ £ »Return (_index> = 0 && _INDEX
}
GREFRESH_CARD :: Grefresh_Card (int _cardnum) {// 3õõõ4 »¯ £» CARD_NUM = _CardNum; card = new std :: vector
Void Grefresh_Card :: free () {delete card; card = null; delete card_color; card_color = null;
AnsiString GRefresh_Card :: Getusefully (int _index) {int _color = Getbyindex (_index)% 13; int _value = Getbyindex (_index) / 13; if (_value> 3) {AnsiString result; _color result = "'óÍõ":? Result = "С õõ"; returnrate;} else {ANSISTRING Result = card_color-> operator [] (_ value) INTOSTR (_COLOR 1); return fruit;}} // ---------- -------------------------------------------------- ---------------
#ifndef refch # deflish refch # include