技术宅拯救世界!网友编写出《流浪地球》“春

2019-04-18 09:11

闅忕潃鏄ヨ妭妗g骞荤數褰便€婃祦娴湴鐞冦€嬬殑鐏垎锛岃秺鏉ヨ秺澶氱殑缃戝弸瀵硅繖閮ㄧ數褰变骇鐢熶簡娴撳帤鐨勫叴瓒c€傜數褰变腑鈥滄槬鑺傚崄浜屽搷鈥濈殑妗ユ鐩镐俊浼氳姣忎竴涓湅杩囩數褰辩殑瑙備紬璁板繂鐘规柊銆傝繎鏃ワ紝鏈夌綉鍙嬬紪鍐欏嚭浜嗐€婃祦娴湴鐞冦€嬧€滄槬鑺傚崄浜屽搷鈥濈殑C璇█婧愮爜锛屽苟涓婁紶鍒颁簡GitHub涓紝璁╂垜浠啀涓€娆¢鐣ュ埌浜嗏€滄妧鏈畢鈥濈殑鍘夊銆?/p>

鍦ㄧ數褰变腑锛屸€滄槬鑺傚崄浜屽搷鈥濈▼搴忔槸宸ョ▼甯堟潕涓€涓€缂栧啓鍑烘潵鐨勶紝閫氳繃鍙戝姩鏈虹瀛愭祦鏉熷柗灏勫埌璺濈鍦扮悆6.5涓囧叕閲岀殑鏈ㄦ槦澶ф皵涓婃柟锛岀劧鍚庡紩鐕冮鑸€呯┖闂寸珯灏嗙伀鐒拌繘涓€姝ュ紩鍚戞湪鏄熷ぇ姘旓紝浠庤€屽疄鐜板紩鐖嗘湪鏄熺殑绋嬪簭銆?/p>

杩欎綅缃戝弸鑷繁鍐欎簡涓€娈礐璇█婧愮爜骞朵笂浼犲埌浜咷itHub涓紝寮曡捣浜嗙綉鍙嬬殑骞挎硾鍏虫敞锛屼互涓嬫槸杩欐C璇█婧愮爜鍏ㄦ枃锛?/p>

// File: twelve_biubiu.c

// Permission: CN-2082-2

// Author: Li.YiYi

// Dept: PE-362, UG

// Origin: TI-352132

//鏄ヨ妭鍗佷簩鍝峛iu biu biu!

#env "planet_engine"

int init() {

set_engine_number_mask(ENGINE_ALL);

set_funeral_level(FUNERAL_FULL);

//鍏佽璇樊10绉掍互鍐?/p>

if (unix_time() < make_unix_time(2082, 1, 28, 23, 59, 60-10)) return ERR_ENGIN_ENV;

return engine_check_init(); // after compile and before real run

}

int main() {

set_curve(CURVE_NATURAL); //鑷劧鏇茬嚎鑰楄垂鐕冩枡鏈€灏?/p>

for (int i :range(0, 12, 1)) {

engine_start();

wait_engine(ENGINE_STATE_CHAGNE);

sleep(2000);

engin_stop();

wait_engine(ENGINE_STATE_CHAGNE);

sleep(4000); //杩欎釜鏃堕暱鍦ㄦā鎷熷櫒閲屽惉璧锋潵鏇村儚蹇冭烦

}

return 0;

}

int final() {

engine_ensure_shutdown();

}

褰撶劧锛岃杩愯杩欐绋嬪簭锛岃繕闇€瑕侀澶栤€滆鏄熷彂鍔ㄦ満鈥濊繍琛岀幆澧冧互鍙婂搴旂殑澶存枃浠躲€?/p>

分享到:
收藏