program AlgoWars; {$APPTYPE CONSOLE} {%ToDo 'AlgoWars.todo'} uses SysUtils, ObjetoVolador in 'ObjetoVolador.pas', Vectores in 'Vectores.pas', Objeto in 'Objeto.pas', Tipos in 'Tipos.pas', Meteorito in 'Meteorito.pas', Armas in 'Armas.pas', Nave in 'Nave.pas', Espacio in 'Espacio.pas', NaveEnemiga in 'NaveEnemiga.pas', NavePropia in 'NavePropia.pas'; const MAX = 3; var // l: array [1..MAX] of cLaser; i: byte; n: cNave; m: cMisilDirigido; // tmp: string; fo: text; begin assignFile( fo, 'log.txt' ); rewrite( fo ); // l[1] := cLaser.create; // l[2] := cLaser.create( cVector.createXYZ( 3, 3, 3 ) ); // l[3] := cLaser.create( cVector.createXYZ( 1, 0, 0 ), // cVector.createXYZ( 1, 1, 1 ) ); n := cNave.create( cVector.create( 0, 0, 0 ), cVector.create( 0.25, 0, 0 ) ); m := cMisilDirigido.create( n, cVector.create( -5, 10, 10 ) ); writeln( fo, 'NAVE: ' + #13 + #10 + n.mGetDebugInfo( DI_MAXI ) + #13 + #10 ); writeln( fo, 'MISIL: ' + #13 + #10 + m.mGetDebugInfo( DI_MAXI ) + #13 + #10 ); for i := 1 to 50 do begin m.mMover( 500 ); n.mMover( 500 ); writeln( fo, i, '-------------------------------------' ); writeln( fo, 'NAVE: ' + #13 + #10 + n.mGetDebugInfo( DI_MAXI ) + #13 + #10 ); writeln( fo, 'MISIL: ' + #13 + #10 + m.mGetDebugInfo( DI_MAXI ) + #13 + #10 ); { if not m.mActivo then begin writeln( fo, 'Murio el misil!!!!' ); m.free; break; end;} end; // for i := 1 to MAX do begin // writeln( fo, 'OBJETO ' + IntToStr( i ) + ': ' + #13 + #10 + // o[i].mGetDebugInfo + #13 + #10 ); // o[i].free; // end; closeFile( fo ); end.