æ¡æã¿ã¼ãã«ã§æ´å°ããï¼ãï¼6ï¼æ¾æè¨ç½®ããã§ã¹ãã¸ã®ã¢ã¤ãã æ ¼ç´æ©è½ã®è¿½å
ååã¾ã§ã®ã話
ä¸åº¦ã«3ã¤ã®å±±ãæ´å°ï¼ååï¼ããé¢æ°ã使ããã¨ã§ãããã¾ã§ã®1.5åå¹çããããªã£ããï¼ï¼å½ç¤¾æ¯ï¼
ãã°ãããããã°ã©ã ã§ããï¼ï¼ç¬èªèª¿æ»ã«ããè©ä¾¡ï¼
ä»åã®ã話
åºãç¯å²ãæ´å°ããã¨ãªãã¨æµMOBã湧ãã®ãå¿é ã§ãããæ¾æãçééã§è¨ç½®ããæ©è½ãä»ãå ãã¾ãããã
ã¾ããæ´å°ãããã¡ã«æã£ããããã¯ãæã¡ãããªããªãã¾ãã
æã¡ãããªããªã£ããããã§ã¹ããè¨ç½®ãã¦ãã¢ã¤ãã ãæ ¼ç´ããæ©è½ãä»ãå ãã¾ãããã
ã©ã®ã¿ã¤ãã³ã°ã§æ¾æããã§ã¹ããè¨ç½®ããã®ã
ã¾ãã¯æ¾æã§ãã
æ¾æãè¨ç½®ãããããã¯ã®æããã¯14ã«ãªãããããã1ãããã¯é¢ãããã¨ã«æããã¯1ãã¤æ¸ã£ã¦ããã¾ãã
æ®éã®MOBã¯æãã7以ä¸ã§æ¹§ãã¯ãããã®ã§ãå®å ¨ã®ããã«å°ä¸ãæãã8以ä¸ã«ç¶æããªãã¦ã¯ãªãã¾ããã
ã©ã®ãããªé ç½®ã§æ¾æãç½®ãã°å¹ççãã¨ããè°è«ã¯ãã§ã«ãããããªã¨ããã§ãªããã¦ãã¾ãããããã§ã¯è¨ç½®ã®ãããããèãã¦ãæ¾æã縦横6ãããã¯ééã§ç½®ãæ¹æ³ãæ¡ç¨ãã¾ãã
å ·ä½çã«6ãããã¯ééã§ç½®ããã¨ãã®æããã®åº¦åãã示ããã®ã以ä¸ã®å³ã§ããåèã¾ã§ã«ã
ã¨ã¯ããå³å¯ã«6ãããã¯ééã¨ããã®ã¯ç¾å¨ä½¿ã£ã¦ããã¢ã«ã´ãªãºã ï¼ä¸åº¦ã«3ã¤ã®å±±ãååããï¼ä¸ã§å®ç¾ããã®ã¯é¢åãªã®ã§ã5ãããã¯ééã§ç½®ããã¨ã«ãã¾ãã
ééã1çãç¨åº¦ãªãã°å¹çããã»ã©åé¡ãªãã§ãããï¼
次ã«ãã§ã¹ããç½®ãã¦ã¢ã¤ãã ãåç´ããã¿ã¤ãã³ã°ã«ã¤ãã¦ã§ãã
ã¿ã¤ãã³ã°ã¯å¤§ããåãã¦ã
- ã¿ã¼ãã«ã®ã¤ã³ãã³ããªãå®æçã«ç£è¦ãã¦ã¢ã¤ãã ãä¸å®ä»¥ä¸è²¯ã¾ã£ãããã§ã¹ããè¨ç½®ããæ¹æ³
- ã¤ã³ãã³ããªã¯æ°ã«ãããçééã§ãã§ã¹ããè¨ç½®ããæ¹æ³
ã®2種é¡ãèãããã¾ãããä»åã¯ãå®è£ ã®ç°¡æããéè¦ãã¦åè ã®ã¢ã¤ãã ã貯ã¾ã£ãæãæ¡ç¨ãã¾ãã
å ·ä½çãªè¨ç½®ã¿ã¤ãã³ã°
ããã§æ³¨æããªãã¦ã¯ãªããªãã®ããæ¾æãç½®ãã¿ã¤ãã³ã°ã¨ãã§ã¹ããç½®ãã¿ã¤ãã³ã°ãéãªã£ã¦ãã¾ããã©ã¡ããä¸æ¹ãç½®ããã¦ããããã«ãããçæ¹ãç½®ãã®ã«å¤±æããã¨ãããã©ãã«ã§ãã
ãããªããªããããå³å¯ã«ãããããç½®ãæ¹åã¨å ´æã決ãã¦ããã¾ãããã
以ä¸ã®å³ã¯ããã®æ´å°ããã°ã©ã ã®ä¸å¿ã¨ãªãseichiThreeStep()
é¢æ°ããã®ç§»åã®è»è·¡ã示ãã¦ãã¾ãã
ä»åã¯ããã®é¢æ°å®è¡ç´å¾ã«æ¾æã¨ãã§ã¹ããåãæ±ããã¨ã«ãã¾ãããã
- æ¾æè¨ç½®ã®æ¡ä»¶ãæºãããã¦ãããçå¾ããæ¯ãåãã¦ï¼å°ä¸ã«ï¼æ¾æè¨ç½®
- ãã§ã¹ãè¨ç½®æ¡ä»¶ãæºãããã¦ããããã®å ´ã§é ä¸ã«ï¼ç©ºä¸ã«ï¼ãã§ã¹ãè¨ç½®
ã®ããã«æ±ºãã¦ããã°ãæ¾æã¨ãã§ã¹ããäºãã«å¹²æ¸ãããã¨ããªãã§ããã
æ¾æã¯5ãããã¯ééã§ç½®ããã¨ã«ãã¾ããããããã¯ä»¥ä¸ã®2ã¤ã®æ¡ä»¶ãåæã«æºããã¨ãã§ãã
- 3ã¤ã®å±±ãååãã
seichiThreeStep()
ã®å®è¡1åããã«ï¼ã¤ã¾ã2åã«1åï¼æ¾æãè¨ç½®ãããã¨ã§ã奥è¡ãæ¹åï¼ç¸¦æ¹åï¼ã«5ãããã¯ééã¨ãªã - æå®ããå¹
ï¼WIDTHï¼ãæ´å°ããããã«æãè¿ãå®è¡ãã
seichiOneLine()
ã®å®è¡5åããã«ï¼ã¤ã¾ã6åã«1åï¼æ¾æãè¨ç½®ãããã¨ã§ãå¹ æ¹åï¼æ¨ªæ¹åï¼ã«5ãããã¯ééã¨ãªã
ããã¦ãã§ã¹ããç½®ããã©ããã¯ãã¤ã³ãã³ããªå ã確èªãããã¨ã§å¤æãã¾ãããã
ããã¾ã§å ·ä½çã«èª¬æããã¨ãããã°ã©ãã³ã°ãããç¨åº¦ã§ãã人ãªãã°ããããããã®ãããã«é¢æ°ãåãè¾¼ãã§ãããã°ããã®ã ãªãããã¦æ¡ä»¶å¼ã¯ã»ã»ã»ãã¨ã ãããäºæ³ãã¤ãã®ã§ã¯ãªãã§ããããã
ããããäºæ³éãã ã¨æãã¾ããå ·ä½çãªã³ã¼ãã¯ä»¥ä¸ãã確èªãã ããã
ã½ã¼ã¹ã³ã¼ã
version0.2ããã®å¤æ´ç¹
ååã®è¨äºã§ç´¹ä»ããversion0.2ããã¯ã以ä¸ã®ç¹ãä¿®æ£ãã¦ãã¾ãã
- æå®ãããããã¯ãä»»æã®æ¹åã«è¨ç½®ãã
placeItem()
é¢æ°ã®å®ç¾© - æ¾æè¨ç½®ã«é¢ãã
placeToarch()
é¢æ°ã®å®ç¾© - ãã§ã¹ãè¨ç½®ã«é¢ãã
putItemsInChest()
é¢æ°ã®å®ç¾© - ãã§ã¹ãè¨ç½®å¾ãã¤ã³ãã³ããªå
ã®ã¢ã¤ãã ãæ ¼ç´ããé¢æ°
dropAllItems()
ãå®ç¾© seichiOneLine()
é¢æ°ã®ä¸ã«ãplaceToarch()
é¢æ°ã¨ãputItemsInChest()
é¢æ°ãåãè¾¼ã¿ã- å ¥æãããããã¯ããã§ã¹ãã«æ ¼ç´ããã®ã§ãversion0.2ã®ã¨ãã«ãã£ããå ¥æãããã¯ã®åæ°ãæ°ãä¸ããæ©è½ã¯ä½¿ããªããªãã¾ãããå®ç¾ããã«ã¯ã¾ãå¥ã®æ¹æ³ã使ããªãã¦ã¯ãªããªãã®ã§ãä»åã¯ãã®ã¾ã¾åã£ã¦ãã¾ãã
ã½ã¼ã¹ã³ã¼ãèªè§£ã®ãã¤ã³ã
å ¨ã¦ãç´°ããè¦ã¦ããã¨ããªããªãã®ã§å¤§ã¾ãã«ãã¤ã³ãã ãæãã¦ããã¾ãããã
placeItem(slot, place_func)
ã®å®ç¾©- å¼æ°ã¨ãã¦ã¹ãããçªå·ãæå®ããè¨ç½®æã«ä½¿ãé¢æ°ããªãã·ã§ã³ã¨ãã¦æå®ã§ãã¾ãã
- ç¹ã«é¢æ°ãå¼æ°ã¨ãã¦æ¸¡ãã¦ããç¹ã«ã注æãLuaã¯é¢æ°ããã¡ã¼ã¹ãã¯ã©ã¹ãªãã¸ã§ã¯ãã¨ãªã£ã¦ããã®ã§ãé¢æ°ããèªä½ãé¢æ°ã®å¼æ°ã¨ãã¦æ¸¡ããã¨ãã§ãã¾ãã
- é¢æ°ãç¹ã«æå®ããªãã¨ãã«ã¯ãããã©ã«ãã§æ£é¢ã«ãããã¯ãè¨ç½®ãã¾ãã
- ãã¨ãã°è¨ç½®ããæ¹åãä¸ã«ãããªãã°ã
turtle.placeUp
ãæå®ãã¦ããã¾ãããããªããããã§é¢æ°åæ«å°¾ã®()ã¯ã¤ãã¦ã¯ããã¾ãããã¤ããã¨ãã®é¢æ°ãå®è¡ããçµæãå¼æ°ã¨ãã¦æ¸¡ããã¨ã«ãªã£ã¦ãã¾ãã¾ãã
placeToarch(i, current_w)
ã®å®ç¾©- 縦横5ãããã¯ããã«è¨ç½®ããããã«ã
seichiThreeStep()
ã®å®è¡ãä½åç®(i)ããããã¦ç¾å¨ã®æ¨ªæ¹åã®ä½ç½®ï¼current_wï¼æ å ±ãå¼æ°ã¨ãã¦æ¸¡ãã¦ãã¾ãã
- 縦横5ãããã¯ããã«è¨ç½®ããããã«ã
putItemsInChest()
- 12çªç®ã®ã¹ããããè¦ã¦ãä½ãã¢ã¤ãã ãå ¥ã£ã¦ããããã§ã¹ãã«ããããå ¨ã¦æ ¼ç´ãããã¨è©¦ã¿ã¾ãã
- ã©ã®ã¹ããããè¦ãã¹ããã¯èª¿æ´ã®ä½å°ãããããããã¾ããã
dropAllItems()
ã®å®ç¾©- ã¹ããã1ãã14ã¾ã§ã®ã¢ã¤ãã ããã§ã¹ãã«æ ¼ç´ãã¾ãã
- dropãªã®ã«ãä¸æ¹åã«è½ã¨ãã¨ã¯ããããã«ï½
seichiOneLine(current_w)
é¢æ°ã«ã¯åãã¼ã¸ã§ã³ããããªãæãå ãã¦ãã¾ãã- ä½ç½®æ
å ±ãå
é¨ã§åãæ±ãããã«ãå¼æ°ã¨ãã¦
current_w
ãå¿ è¦ã¨ãã - ç¾å¨ã®å¥¥è¡ããå¦çããããã«ã
current_d
ã¨ããå¤æ°ãå é¨ã§åãæ±ã£ã¦ãã - ååã¯ææãããã¾ããããã§ããã ãããããããããããã«ãå²ãç®ã®åã¨ä½ããæ示çã«å¤æ°ã§åãæ±ã£ã¦ãã
seichiThreeStep()
ã®å®è¡ç´å¾ã«ãæ¾æã»ãã§ã¹ãé¢ä¿ã®å¦çãæ¿å ¥
- ä½ç½®æ
å ±ãå
é¨ã§åãæ±ãããã«ãå¼æ°ã¨ãã¦
ãããã«
ãããã«200è¡è¶ ãã®ããã°ã©ã ã解説ããã®ã¯å¤§å¤ãªã®ã§ãæ¦ç¥ã®èª¬æã¨ãªãã¾ããã
説æä¸è¶³ãªç®æãå¤ãã®ã§ã質åçããã°æ°è»½ã«ã©ããã
ãã¦ããã§ã奥è¡ãï¼å¹ ï¼é«ããæå®ãã¦ããã®ç¯å²ãæ´å°ï¼ååï¼ããããã°ã©ã ã¯å®æãã¾ããã
次åã¯ããã®ããã°ã©ã ã®çºå±å½¢ã¨ãã¦ãé«ããæå®ããªãã¦ãèªåçã«é«ããå¤å¥ãã¦ååããããã°ã©ã ãæ¤è¨ãã¾ãã
ã楽ãã¿ã«