Курсовая работа: Система координат канви
TBilliardTable *BilliardTable= new TBilliardTable;
{ if(BallsInMove) exit;
if(! Cue->Visible ) exit;
if(Player == 1 ) exit;// нельзя управлять во время хода компьютера!
// cur = Cue->ToBall->ID;
if(Key == VK_DOWN)
Cue->Angle = Cue->Angle - Step;
if(Key == VK_UP)
Cue->Angle = Cue->Angle + Step;
if(Key == VK_RIGHT )
{ cur = (cur + 1) % Ball->count;
//b = Ball->Items[cur];
}while( b->exists);
if(Key == VK_LEFT )
do{ cur = (cur - 1 + Ball->count) % Ball->count;
// b = Ball->Items[cur];
}while( b->exists);
if(Key == 32 ) if (Cue->Visible) Cue->Hit();
if(Key == 13 ) ComputerMove();
if (Key = 13) StopAll();
// Cue->ToBall = Ball->Items[cur]; } }}
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{{ int cur, i, num;
TBall *b, *b2 = new TBall;
boolean allstopped;
TLose *lz = new TLose;
float d;
char* Mess;
{ tick++;