pico-8 cartridge // http://www.pico-8.com version 42 __lua__ function _init() mymap={ w=68, h=11, } tetris_mode=false coins_collected=false chest_collected=false initcoins() initkey() initchest() inittetris() initplayer() initwater() poke(0x5f5c,255) --disable btnp repeat end function _update() -- updatewater() if tetris_mode==false then updateplayer() end if btnp(❎) then reload() _init() end if tetris_mode==false and btnp(🅾️) then tetris_mode=true newtetris() end if tetris_mode==true and current_t!=nil then if current_t.stopped==true then stoptetris() end updatetetris() end end function _draw() cls() camera(player.x-20,-15) map(0,0,0,0,mymap.w,mymap.h) drawcoins() -- drawkey() -- drawchest() if tetris_mode==true and current_t!=nil then draw_t_falling() end -- drawwater() drawplayer() if coins_collected==true and chest_collected==true then print("you win!\npress x to restart",player.x-5,9,3) end print("x to restart",player.x+40,1,4) print("z to summon a tetris block",player.x-8,8,4) end -->8 function initplayer() player={ x=8, y=mymap.h-8, dir=false, vv=0, vh=2, w=8, h=8, image=3, timer=0, walking=false, jumping=false, inwater=false } v0=-4.5 gravity=0.5 vf=-1 --float v1=-2.5 --jump in water end function updateplayer() local dx=0 local dy=0 --walk if btn(⬅️) and player.x>=10 then dx=-player.vh player.dir=true for i=1,player.vh do local new_x,new_y,_,_=trymove(player.x,player.y,-1,0) player.x=new_x player.walking=true end elseif btn(➡️) and player.x<=mymap.w*8-player.w-10 then dx=player.vh player.dir=false for i=1,player.vh do local new_x,new_y,_,_=trymove(player.x,player.y,1,0) player.x=new_x player.walking=true end else player.walking=false end--if --jump & fall player.inwater=isinwater(player.x+4,player.y+4) if player.inwater==false then if isonground() then player.vv=0 if btnp(⬆️) then sfx(1) player.vv=v0 player.walking=false end else player.vv+=gravity end dy=player.vv --falling if dy>0 then dy=ceil(dy) for i=1,dy do local new_x,new_y,_,actual_dy=trymove(player.x,player.y,0,1) player.y=new_y if actual_dy==0 then player.vv=0 break end --if end --for elseif dy<0 then --jumping dy=flr(dy) for i=1,-dy do local new_x,new_y,_,actual_dy=trymove(player.x,player.y,0,-1) player.y=new_y if actual_dy==0 then player.vv=0 end --if end --for end end ----in water if player.inwater==true then player.vv=vf dy=player.vv for i=1,-dy do local new_x,new_y,_,actual_dy=trymove(player.x,player.y,0,-1) player.y=new_y if actual_dy==0 then player.vv=0 end end end if player.inwater==true or isinwater(player.x+4,player.y+14) then if btnp(⬆️) then --jump in water sfx(1) player.vv=v1 end end --image state if isonground()==false then player.walking=false player.jumping=true else player.jumping=false end --eat coins if coins_collected==false then eatcoin() end -- getkey() -- if chest_collected==false then -- openchest() -- end end function drawplayer() if player.inwater==true then player.image=36 elseif player.walking==true then player.timer+=1 if player.timer%6==0 then sfx(2) if player.image==3 then player.image=19 else player.image=3 end end elseif player.jumping==true then player.image=35 else player.image=3 end spr(player.image,player.x,player.y,1,1,player.dir) end ------------ function issolid(x,y) local tile=mget(flr(x/8),flr(y/8)) local f=fget(tile) if f==1 then return true else return false end--if end function trymove(x,y,dx,dy) local new_x=x+dx local new_y=y+dy local collided_x=false local collided_y=false if dx>0 then --right for i=0,player.h-1 do if issolid(new_x+player.w-1,new_y+i) then collided_x=true break end --if end --for end --if if dx<0 then --left for i=0,player.h-1 do if issolid(new_x,new_y+i) then collided_x=true break end --if end --for end --if if dy>0 then --down for i=0,player.w-1 do if issolid(new_x+i,new_y+player.h-1) then collided_y=true break end --if end --for end --if if dy<0 then --up for i=0,player.w-1 do if issolid(new_x+i,new_y) then collided_y=true break end --if end --for end --if if new_y<0 then dy=0 collided_y=true end if collided_x==true then dx=0 end if collided_y==true then dy=0 end return x+dx,y+dy,dx,dy end function isonground() for i=0,player.w-1 do if issolid(player.x+i,player.y+player.h) then return true end --if end --for return false end ---------- function isinwater(x,y) local x1=flr(x/8) local y1=flr(y/8) if water_state[x1][y1]==true then return true else return false end--if end -->8 function initwater() water_map={} water_state={} water_level=mymap.h-1 rising=true maxtime=30 water_timer=maxtime for x=0,mymap.w-1 do water_map[x]={} water_state[x]={} for y=0,mymap.h-1 do local tile=mget(x,y) local f=fget(tile) if f!=1 and f!=4 then water_map[x][y]=true --not solid else water_map[x][y]=false --ground end--if water_state[x][y]=false end end end function water_rise() if water_level>0 then water_level-=1 for i=0,mymap.w-1 do if water_map[i][water_level]==true then water_state[i][water_level]=true end end end end function water_fall() if water_level8 function initcoins() score=0 totalscore=3 coins={} for x=0,mymap.w do for y=0,mymap.h do local tile=mget(x,y) if tile==5 then add(coins,{ x=x*8, y=y*8, w=6, collected=false, timer=0 }) mset(x,y,2) end--if end end end function eatcoin() for c in all(coins) do if c.collected==false and isoverlap(c.x,c.y,c.w)==true then c.collected=true sfx(0) score+=1 c.timer=3 end--if end--for end function isoverlap(x0,y0,w0) local x=player.x local y=player.y if x+player.wx0+w0+(8-w0)/2 or y+player.hy0+w0+(8-w0)/2 then return false else return true end end function drawcoins() for c in all(coins) do if c.collected==false then spr(5,c.x,c.y) elseif c.timer>0 then spr(21,player.x+8,player.y) spr(21,player.x-8,player.y,1,1,1) c.timer-=1 end--if end print("score:"..score,player.x-8,1,4) print("/"..totalscore,player.x+20,1,4) if score==totalscore then coins_collected=true end end ------------ function initkey() for x=0,mymap.w do for y=0,mymap.h do local tile=mget(x,y) if tile==6 then key={ x=x*8, y=y*8, w=6, collected=false } mset(x,y,34) break end--if end end end function getkey() if key.collected==false and isoverlap(key.x,key.y,key.w)==true then key.collected=true sfx(0) end--if end function drawkey() if key.collected==false then spr(6,key.x,key.y) elseif chest_collected==false then print("key:z to use",player.x+30,1,4) end end function initchest() for x=0,mymap.w do for y=0,mymap.h do local tile=mget(x,y) if tile==7 then chest={ x=x*8, y=y*8, w=8, collected=false, timer=0 } mset(x,y,2) spr(7,key.x,key.y) break end--if end end end function openchest() if btnp(🅾️) and key.collected==true and chest.collected==false and isoverlap(chest.x,chest.y,chest.w)==true then chest.collected=true chest_collected=true sfx(3) chest.timer=15 end--if end function drawchest() if chest.collected==false then spr(7,chest.x,chest.y) else if chest.timer>0 then chest.timer-=1 spr(8,chest.x,chest.y-12+chest.timer/3) end spr(23,chest.x,chest.y) print("treasure found!",player.x+30,1,4) end end -->8 function inittetris() alltetris={} current_t=nil speed=15 t_type={ --l [1]={{0,0},{0,1},{0,2},{1,2}}, --l2 [2]={{0,0},{1,0},{1,1},{1,2}}, --j [3]={{1,0},{1,1},{1,2},{0,2}}, --j2 [4]={{0,0},{1,0},{0,1},{0,2}}, --t [5]={{0,0},{1,0},{2,0},{1,1}}, --t2 [6]={{0,1},{1,0},{1,1},{1,2}}, --z [7]={{0,0},{1,0},{1,1},{2,1}}, --z2 [8]={{0,1},{1,1},{1,0},{2,0}} } end function newtetris() current_t={ x=ceil(player.x/8)+2, y=0, x_min=ceil(player.x/8)+1, y_min=0, x_max=ceil(player.x/8)+8, y_max=mymap.h, type_id=flr(rnd(8))+1, blocks={}, stopped=false, timer=0 } for b in all(t_type[current_t.type_id]) do add(current_t.blocks,{b[1],b[2]}) end end function updatetetris() if current_t!=nil then current_t.timer+=1 if current_t.timer==speed then trymove_t(0,1) --down current_t.timer=0 end if btnp(⬅️) then trymove_t(-1,0) elseif btnp(➡️) then trymove_t(1,0) end end end function trymove_t(dx,dy) for b in all(current_t.blocks) do local bx=current_t.x+b[1]+dx local by=current_t.y+b[2]+dy if bxcurrent_t.x_max then return elseif issolid(bx*8,by*8+8)==true then current_t.y+=dy current_t.stopped=true return end end current_t.x+=dx current_t.y+=dy return end function stoptetris() draw_t_stopped() add(alltetris,current_t) tetris_mode=false current_t=nil end function draw_t_stopped() if current_t!=nil then for b in all(current_t.blocks) do local bx=current_t.x+b[1] local by=current_t.y+b[2] mset(bx,by,10) end end end function draw_t_falling() if current_t!=nil then for b in all(current_t.blocks) do local bx=current_t.x+b[1] local by=current_t.y+b[2] spr(10,bx*8,by*8) end end end __gfx__ 0000000033b3b3b377777777002eeee0cccccccc00000000000000000c1111c000000000000000007777777d0000000000000000000000000000000000000000 000000003b333b3377777f7722222eeec11cc11c009a9a0000000cc0c111111c0100001000000000f999999d0000000000000000000000000000000000000000 007007003333333377777777055797501cc11cc109a9a9a00000c880999889990100001000000000f999999d0000000000000000000000000000000000000000 00077000444444447f77777755919195cccccccc09aaaa90000c8800c118811c0000000000000000f999999d0000000000000000000000000000000000000000 00077000454445447777777705998990cccccccc09aaa9a00cc88000c118811c0eeeeee000000000f999999d0000000000000000000000000000000000000000 00700700444544447777777700e2e2e0c11cc11c099aaa900c080000c111111c00eeee0000000000f999999d0000000000000000000000000000000000000000 00000000444444547777f7770e02220e1cc11cc10099990008880000c111111c000ee00000000000f999999d0000000000000000000000000000000000000000 00000000454444447777777700020200cccccccc0000000000000000c111111c0000000000000000111111110000000000000000000000000000000000000000 000000004454444477777777002eeee000c100c10000000000000000c111111c0000000000000000000000000000000000000000000000000000000000000000 00000000544444547777777722222eeec11cc11c0009a000000000000c19a1c00000000000000000000000000000000000000000000000000000000000000000 000000004445444477777777055797501cc11cc100900000000000000c9e9ac00000000000000000000000000000000000000000000000000000000000000000 00000000444444447777777755919195cccccccc0000000000000000c9a9e9ac0000000000000000000000000000000000000000000000000000000000000000 0000000045444544b77777b705998990cccccccc00990a0000000000cccccccc0000000000000000000000000000000000000000000000000000000000000000 00000000444544447b777b7700e2e2e0c11cc11c0000000000000000c111111c0000000000000000000000000000000000000000000000000000000000000000 00000000444444547b77b777000e22e01cc11cc10090000000000000c111111c0000000000000000000000000000000000000000000000000000000000000000 000000004544444477b7b77700022000cccccccc0009a00000000000c111111c0000000000000000000000000000000000000000000000000000000000000000 000000000000000077777777002eeee0002eeee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000007777777722222eee22222eee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000007777a77705519150055191500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000007777777755979795559797950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000007a7777770e99899e009989900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000007777777700e2e2e00ee2e2ee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000777777a700022200700222070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000007777777700200020007202700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __gff__ 0001000002000000000001000000000000010000020000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __map__ 0202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020202020202020202020202020202020202020202020202020202020502020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020202020202020202020202020202050202020202020202020202010101010202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020205020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020201020202020202020202020202020101010102020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020211020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020111010202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020211020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020211020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202021102020202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020202020202050202020202020202020202020202020202020202020202020202020202020202020202020205021102020202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020101011102021212020212120205020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020201010101010102020202020202020202020202020205020212121202020202020202020202021202021102050202010101020201010101020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202020211222222221102020202020202020702020202020201010101010101010101020202020102010102021102020202110202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202010111062222221102020202020202010101020202020211111111222222222211010202021102020202121102020101110202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020205120202020211111102020202020212020202020202020202020211111111222222220511020202121102020202011102020202020202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020201010102020202020202020202020101010202020202020202020211111111222201010111020202011102010102021102020202020202020202020202121212120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202020202021202020202020201011105020202020202020202020211111111020202020202020202021102020202020202020202020202020202020201010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0212120202020202010101020212010111110202020202021202121202020211111111020202020202020202021102020202020202020202020202020101010111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0101010101010101111111010101111111111101010101010101010101010111111111010101010101010101011101010101010101010101010101011111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 __sfx__ 000200001a0101d0201f0202002023020260202b02030020360103800037000360003400034000370003600036000340003400033000320003200022000220002200000000000000000000000000000000000000 0101000013050130501106013060180601a0601c0501d000287002870028700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000100000c0510c0062eb0630b0732b0736b0700000080000c0000e8061cb05303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000800001850015560175601856015560185601c5601f5601f560255002c5002a0002b0002a000290002800027000250002300021000210002100022000220000000000000000000000000000000000000000000 0010000000000000000000026050240502305022050200501d0501905015050120501105011050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0020000018a5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000