TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
572 B
22 lines
572 B
<?php
|
|
|
|
/**
|
|
* Tetris Game - Pure PHP Logic + Win32 C++ Drawing Primitives
|
|
*
|
|
* This project demonstrates the AOT compiler's capability:
|
|
* - C++ only wraps Win32 APIs (window, message, GDI drawing)
|
|
* - ALL game logic is implemented in PHP
|
|
*/
|
|
|
|
// ============================================================
|
|
// Constants
|
|
// ============================================================
|
|
|
|
const BLOCK_SIZE = 30;
|
|
const BOARD_HEIGHT = 20;
|
|
const WINDOW_HEIGHT = BLOCK_SIZE * BOARD_HEIGHT + 40;
|
|
|
|
function main(): void
|
|
{
|
|
var_dump(BLOCK_SIZE, BOARD_HEIGHT, WINDOW_HEIGHT);
|
|
}
|
|
|