Курсовая работа: Система координат канви
float CalculateAngle;
int tick;
bool MustBeHitted;
int Balls;
int ballsIn;
TForm1 *Form1;
TCue *Cue=new TCue;
TBall *Ball=new TBall;
TBilliardTable *BilliardTable= new TBilliardTable;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{}
void __fastcall TForm1::StopAll(){
{ int i;
TBall *b = new TBall;
{ for( i =0; i<=BilliardTable->Ball->Count-1; i ++)
{ //b=BilliardTable->Ball->Items[i];
b->dx = 0;
b->dy = 0; }
Cue->Visible = True; } }}
void ComputerMove(){
Cue->Visible = True;
CompAngle = CalculateAngle;
if(CompAngle > Cue->Angle)
CompMove = 1;
else CompMove = -1;}
void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{{ int cur;