なあ、再帰関数好きな人いる? パート3 [転載禁止]©2ch.net (914レス)
なあ、再帰関数好きな人いる? パート3 [転載禁止]©2ch.net http://mevius.5ch.net/test/read.cgi/tech/1448704298/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
576: NAS6 ◆n3AmnVhjwc [] 2016/01/05(火) 07:31:25.96 ID:FnNfbNzM stk =Array.new() #同色上書き塗りつぶし def loop_refill(dest,src,x,y,color,minx,miny,maxx,maxy) term = 0 while !((x < minx) || (maxx < x) ||(y < miny) || (maxy < y)) dest[y][x] = color #上 if (term < 1) && (src[y-1][x] == color) && (dest[y-1][x] != color) term = 0 stk.push(x) stk.push(y) stk.push(term) y = y - 1 term = 0 next end #左 if (term < 2) && (src[y][x-1] == color) && (dest[y][x-1] != color) term = 1 stk.push(x) stk.push(y) stk.push(term) x = x - 1 term = 0 next end http://mevius.5ch.net/test/read.cgi/tech/1448704298/576
579: NAS6 ◆n3AmnVhjwc [] 2016/01/05(火) 07:57:54.39 ID:FnNfbNzM >>575-577 はdestにcolorが最初から使われていると、それ以上塗れないバグがあるな ま、いいか http://mevius.5ch.net/test/read.cgi/tech/1448704298/579
582: NAS6 ◆n3AmnVhjwc [] 2016/01/05(火) 08:16:57.10 ID:FnNfbNzM >>576-577 も同様に直してね http://mevius.5ch.net/test/read.cgi/tech/1448704298/582
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.037s