CARVIEW |
Select Language
HTTP/2 200
date: Fri, 10 Oct 2025 18:55:03 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=0de37114b3ee0a69d79b0f82b086acc6831a921621d7b497956603ff4bdc8366a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22E2bxwERjWkKh1F-MxW4CrID0HoP2fVFG%22%3B%7D; HttpOnly; Path=/
cf-ray: 98c8546d4bffb080-BLR
Tetro - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program new;
- const
- DEFAULT_START = 7;
- TETRIS_ROWS = 15;
- var
- column: string := ' '*20;
- board: array of Char;
- tetroLocation: Int32 = DEFAULT_START;
- thisTetro: TByteArray;
- const
- tetros:array of TByteArray = [[1,16,31,46], [2,15,16,17], [1,15,16,17], [2,15,16,17], [1,2,16,17], [0,1,16,17], [1,2,15,16]];
- function ToString(constref x:array of Char): string; override;
- var i: Int32;
- begin
- for i:=0 to High(x) do
- begin
- if (i mod 15 = 0) and (i > 0) then Result += LINE_SEP;
- Result += x[i];
- end;
- end;
- procedure SetRandomTetro();
- begin
- thisTetro := tetros[Random(Length(tetros))];
- end;
- function VerifyFreeSapce(blank:Char=' '): Boolean;
- begin
- {lowest pnt}
- if (tetroLocation+thisTetro[3]) div 15 > TETRIS_ROWS then Exit(False);
- Result := (board[tetroLocation+thisTetro[0]] = blank) and
- (board[tetroLocation+thisTetro[1]] = blank) and
- (board[tetroLocation+thisTetro[2]] = blank) and
- (board[tetroLocation+thisTetro[3]] = blank);
- end;
- procedure DrawTetro(sym:Char='#');
- begin
- board[tetroLocation+thisTetro[0]] := sym;
- board[tetroLocation+thisTetro[1]] := sym;
- board[tetroLocation+thisTetro[2]] := sym;
- board[tetroLocation+thisTetro[3]] := sym;
- end;
- procedure DropTetro();
- begin
- Inc(tetroLocation, 15);
- end;
- procedure UndropTetro();
- begin
- Dec(tetroLocation, 15);
- end;
- var
- I:int32;
- TetrisFrame: TImage;
- begin
- SetLength(board, Length(column)*25);
- for i:=0 to 14 do Move(column[1], board[i*20], 20);
- TetrisFrame := TImage.Create(500,1000); //this could be a form
- TetrisFrame.FontName := 'Consolas';
- TetrisFrame.Show();
- SetRandomTetro();
- while true do
- begin
- TetrisFrame.DrawColor := 0;
- TetrisFrame.DrawText(ToString(board), [50,50]);
- DrawTetro(#32);
- DropTetro();
- if not VerifyFreeSapce() then
- begin
- UnDropTetro();
- DrawTetro('#');
- TetrisFrame.DrawColor := $0077FF;
- TetrisFrame.DrawText(ToString(board), [50,50]);
- TetrisFrame.Show(False);
- SetRandomTetro();
- tetroLocation := Random(0,12);// DEFAULT_START;
- // still not free!?¤!"¤"!#%"#%
- if not VerifyFreeSapce() then
- TerminateScript('Game over');
- end else
- begin
- DrawTetro('#');
- TetrisFrame.DrawColor := $0077FF;
- TetrisFrame.DrawText(ToString(board), [50,50]);
- TetrisFrame.Show(False);
- end;
- //Sleep(100);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Make $15OO in 2O minutesV E⭐⭐
Java | 1 sec ago | 0.10 KB
-
⭐✅ Swapzone Glitch ✅ Working⭐⭐⭐ R
JavaScript | 9 sec ago | 0.24 KB
-
⭐⭐⭐GMAIL Logs (2FA disabled)⭐⭐
Java | 13 sec ago | 0.10 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ B
JavaScript | 20 sec ago | 0.24 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 24 sec ago | 0.10 KB
-
⭐⭐Exchange Exploit⭐⭐ Y
JavaScript | 31 sec ago | 0.24 KB
-
⭐⭐⭐Swapzone.io Glitch (Working)⭐⭐
Java | 36 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ I
JavaScript | 42 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand