2006-03-17から1日間の記事一覧
フィボナッチ数列のジェネレーター生成関数です。 #!/usr/bin/env python # -*- coding: utf-8 -*- def makeFibonacci(): def fibonacci(): # フィボナッチ数列のジェネレーター a0, a1 ,a2 = 1, 0, 0 while True: yield a0 a2 = a1 a1 = a0 a0 = a1 + a2 re…
めもめも。 ウィンドウ生成 size(w, h); // w:幅 h:高さ 描画系 background(0xffffff); // 背景塗りつぶし(0xffffffはRGB) fill(0xff, 0xff, 0xff); // 塗りつぶし色を設定(RGB) point(x, y); // x,yに点を描画 line(x1, y1, x2, y2); // x1,y1〜x2,y2に…
カニバサミ弾です。 <bulletml> <action label="top"> <repeat> <times>1</times> <action> <fire> <direction type="absolute">0</direction> <speed>4</speed> <bulletRef label="seed1"/> </fire> </action> </repeat> <repeat> <times>1</times> <action> </action></repeat></action></bulletml>