ãé£ã¹ãã°ãã®æ稿ã«é¢ãã¦
ã¬ã¹ãã©ã³ã®é£²é£ã«é¢ããæ稿ã»æ¤ç´¢ãµã¤ããé£ã¹ãã°ãã«è²ã ã¨ã¬ãã¥ã¼ãæ¸ãã¦ãã¾ããããã¾ã«âä¸æ¸ãæ»ãâï¼ä¿ç§°ï¼ããã¾ããããã¯å ¬éããã¬ãã¥ã¼ã®å 容ãâé£ã¹ãã°ã®åºæºï¼ã¬ã¤ãã©ã¤ã³ï¼ããå¤ãã¦ããâå ´åã«ããµãã¼ãããããå¤æãã¦å ¬éã¢ã¼ãããä¸æ¸ãã¢ã¼ãã«å¤æ´ãããã¨ã§ããSGMã¨ç¥ããã¨ãããã¾ãã
åºæºã®è©³ç´°ã¯å²æãã¾ãããåºæ¬çã«ååããªå 容ãæå¾ ããã¦ããããã§ãç§ã®ããã«å¾ãåãã®æ å ±ãå ±æãããã¨ããã¨SGMãããããã§ãéå»ã«æ°ååSGMããããçµé¨ãããã¾ãã
ãã®å ´åãææãããç®æï¼ã¡ã¼ã«ã§å ·ä½çã«ææãããï¼ãæ¸ãç´ãã¦åå ¬éãããã¨ãåºæ¬ã§ãããããã©ãããå ´åã¯ä¸æ¸ãã®ã¾ã¾æ¾ç½®ãããããã¾ããããããã¬ãã¥ã¼ãè¤æ°åå¨ãã¾ãã
ç¾å¨ã®æ稿æ°ï¼å ¬éåï¼ã¯1,420件ã§ãã¬ãã¥ã¼ãæ¸ããã®ã1522件ãªã®ã§ãè¦ããä¸ã¯100件ãã¾ãä¸æ¸ãã®ã¾ã¾æ¾ç½®ãã¦ããè¨ç®ã«ãªãã¾ãããã ãããã®ä¸ã§SGMããã¦æ¾ç½®ç¶æ ã®ã¬ãã¥ã¼ã¯10æ°ä»¶ã ã¨æãã¾ãï¼é常ã®ä¸æ¸ãã¨ã¯ããã«ã¯åºå¥ã§ããªãã®ã§æ°ããã®ãããã©ãããï¼ã
ãã¦ãã¤ããã®éãSGMããã¾ãããã¾ãæ £ãã£ããªã®ã§ãã¾ãããã¨ããæãã§ãã¾ãæ°ã«ãã¾ããããé£ã¹ãã°ãµãã¼ããããã®ãããªã¡ã¼ã«ãåãåãã¨ãæ£ç´ãå«ãªæ°åã«ãªãã®ã¯ç¢ºãã§ããæ¸ããã¨ãã«èã SGMãããããï¼ã¨æããªããå ¬éãã¦ãããã¨ãå°ãªããªãã®ã§â確信ç¯âã¨ãè¨ãã¾ããããã¾ã«ããããä½ã§SGMããããã ï¼ãã¨ããã±ã¼ã¹ãããã¾ãã
ä»åãããã«è»¢è¨ããã®ã¯ãããªSGMãããã¬ãã¥ã¼ã«ãªãã¾ããSGMãããçç±ã®ç®æãâ¼â¼â¼â¼â¼ã¨â²â²â²â²â²ã§ãããã¾ããããä»åã¯ããªãå¤ãã®æé¢ãå¼ã£ããã£ãããã§ãã確ãã«æç´°éãã®äºå®ã¨ããã¸ã®ã¹ã¿ããã®å¯¾å¿ãããã¦èµ·ãã£ãçç±ã®æ¨æ¸¬ãäºç´°ãã«æ¸ããã®ã§ãããããããï¼ä¾ã注æåã®åçãã¬ã·ã¼ãã®ç»åããã£ãã¨ãã¦ãï¼ãã¹ãçºçãã客観çãªè¨¼æ ã¨ãã¦ã¯ä¸ååãªã®ã¯åããã¾ãããæç« çã«ã¯ã¯ã¬ã¼ã ã§ã¯ãªã対å¿ãè¯ãã£ãã¨ããå ±åã¨ãä»ã®å®¢ã¸ã®æ³¨æåèµ·ã ã£ãã®ã§ãããå¾ãåãã®å 容ã ã¨å¤æãããé¢ããã£ãã®ãå¦ãã¾ãããï¼å人çã«ã¯ä»ã®ç®æãä¾ãã°ã¹ã¿ããã®ä¸äººã®âããã¡ããâã®é¨åãããã§ã¼ã§ã¯ãªããã¨æã£ã¦ããã®ã§ããã©ãï¼
Â
ã¼ã¼ã¼ã¼ã¼ã¼åæã®æ稿å 容ã¸ã®ãµãã¼ãããã®èªåã³ã¡ã³ãã¼ã¼ã¼ã¼ã¼ã¼
é£ã¹ãã°ãµãã¼ãããã®ã¡ã¼ã«ãã確èªãã ããã
é£ã¹ãã°ã«ãæ稿ããã ãããããã¨ããããã¾ãã
大å¤æ縮ã§ã¯ãããã¾ãããå£ã³ãã¬ã¤ãã©ã¤ã³ã«è©²å½ãã¦ããã¾ãããããä¸æ¸ãç¶æ ã¸å¤æ´ããã¦ããã ãã¾ããããææ°ããæããã¾ãããé£ã¹ãã°ãµãã¼ãããã®ã¡ã¼ã«ãã確èªããã ããå£ã³ãã®ãä¿®æ£ããé¡ããããã¾ãã
ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼åæã®æ稿å 容ã®è»¢è¨ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼
ãé³¥ã¶ããã«é¢ããæ§ã ãªèå¯ãé·æã
ç¸å¤ããããªãã¼ããã¦ãã¾ããä»åã§4åç®ã¨ãªãã¾ããããã®åºã«é¢ãã¦è²ã ã¨åãã£ã¦ããæããªã®ã§ãä¸éå ±åã¨ãã¦ã¾ã¨ãã¦ã¿ã¾ãã(ã£ã¦æçµå ±åãããããã§ããªã)
âç¼ãé³¥ã®ã«ãã´ãªã¼ã«é¢ããã³ã¹ã
ãã®åºã¯ç¼ãé³¥ã主åååã¨ãªã£ã¦ãã¾ãããã¡ãã(ãããã)ãµã¤ãã¡ãã¥ã¼ãè±å¯ã«ã©ã¤ã³ã¢ããããã¦ãã¾ãããã¾ãã¯ç¼ãé³¥ã¨ãããã¨ã§ãä»ã¾ã§é£ã¹ãç¼ãé³¥ã«é¢ãã¦ã³ã¹ã(ç¾å³ãã÷ã³ã¹ã)ãè©ä¾¡ãã¦ã¿ããã¨æãã¾ãã以ä¸ã®ä¸¦ã³ã¯ã¡ãã¥ã¼é ã§â3åãæºç¹ã§ãã(ã¼ã¯æªé£)
å¡©ç¼é³¥ããã(220å)âââ
å·è£½ç½ã¬ãã¼(190å)ââ
ãã®ç¼ããã( 80å)â
ã¨ããããã(150å)âââ
ããæ太ãã(150å)â
ãããåµãã(150å)â
æªéã®ãã¶ã(170å)âââ
å¥è·¡ã®ç èã(180å)ââ
ã³ãªã³ãªä¸¸éª¨(180å)â
ããã«ãã«ã(180å)ã¼
ç½ããããã(180å)ââ
èæ±ã¤ããã(240å)ã¼
ããã®å¡©ããã³ç¼ãã(220å)ââ
ããã®èªå®¶è£½ã¿ã¬ç¼ã(220å)ã¼
極ä¸èã®é¤æ²¹ç¼ã(180)ã¼
赤ã²ãããã(180å)â
é³¥ãã串ãã(150å)âââæªéã®ãã¶ã(ã¼ããã)ã¨é³¥ãã串ã¯å人çãªå¥½ã¿ãªã®ã§ã人ã«ãªã¹ã¹ã¡ã§ããã®ã¯ãå¡©ç¼é³¥ãã¨ãã¨ããããã§ããããããã¨ã¯å¥½ã¿ã«å¿ãã¦ã¨ããã¨ããã§ãããã
ãªããä»ã®äººã®æ稿ã§ãå¤çæ¿ã«âç¼ãé³¥80åãâã¨ãã£ããããã¯ãã®ç¼ãã®ãã¨ãªã®ã§ç¼ãé³¥ãããªããåãæ¸ããªãã¨ããã®ãä½ä»¶ãè¦ããã¾ããããã®è¾ºãã¯ã°ã¬ã¼ã¾ã¼ã³ã§ãããããç§èªèº«ãæåã«è¦ãæã«ãå®ããªã¨æã£ãã®ã¯ç¢ºãã§ããå®éã«ã¯å¹³åããã¨ãã®å以ä¸ã®å価ã§ããããéåæããªãã¨ã¯è¨ãã¾ããã
ä½ãã«ãã¦ãç¼ãé³¥ã¨ã¯è¨ããªãããã®ç¼ããã¨ããããåµãã¯ãªã¹ã¹ã¡ãã¾ãããã(ãã®ã®éã«å°ããããèã§ãæãã§ä¿ã«ããããã®ããã«ä»ç«ã¦ãã°ããã®ã«âç§ã¯é£ã¹ãªããã©)
âååæç(ãµã¤ãã¡ãã¥ã¼)ã«é¢ããã³ã¹ã
ç¼ã鳥以å¤ã®ååæçãããããããã¾ãããã¾ã ã»ã¨ãã©é£ã¹ã¦ããªãã¾ãããã§ãç¾æç¹ã§ãã¨ããããé£ã¹ããã®ã®ã³ã¹ããå ±åãã¾ãã
çåç¼ãããããã(380å)ââ
é·ããã¼ã天ããã(380å)âââ
åµé»ãããã°ããã(480å)ââ
è¬å³ã©ã£ãããã£ã(380å)âãã®ä¸ã§ã¯ãé·ããã¼ã天ãããªã¹ã¹ã¡ã§ãããã ãã®âããã¡ããâãã¤ããªã·ãã¦ãã¾ãããåä¾¡æ ¼ã®ä»ã®æçã¨æ¯è¼ãã¦ããå¤æã¡ã ã¨æãã¾ããéã«ä»åé£ã¹ããè¬å³ã©ã£ãããã£ããã¯å¤æ®µä¸ç¸å¿ã§ã280åã«ã©ã³ã¯ãã¦ã³ãã¹ãã§ããããã¯ã®æ¨ç¶¿è±è ãååã«åã£ããã®ã®ä¸ã«ãã®ãã«ã¤ã¯ã¬ãªã©ã®è¬å³ãã¦ããçãããã ãã®ã¹ãã¼ãã¡ãã¥ã¼ãªã®ã§ããå¨æ¿å ã§ããã¡ããããµã¯ãã¨çãä»ãã¦æã£ã¦ãã¦ããã¾ããã(å¨æ¿ãè¦ãããã¸ã·ã§ã³ã¯ããããæã«å½¹ç«ã¤)
ãåµé»ãããã°ãã¯ç§å¥½ã¿ã®å³ã§ãã½ã¼ã¹ãããã§ããã¨ããããã使ããã¦ãã¾ããå¦çæ代ã«éã£ãã好ã¿ç¼ãå±ã§æ¯åãç¼ããã°å®é£ããé£ã¹ã¦ããã®ã§ããããã®æ追å ã§ã½ã¼ã¹ãããã¦ãã¾ãããé£ã¹ãå¾ã«ç¿ã«ã½ã¼ã¹ãæ®ãããããã£ã·ãã¨ãããã¡ããã¯ãå³ãæ¿ãããªãï¼ãã¨å¿é ãã¦ããã¾ãããã(ç§ã®å¥½ã¿ã«åã£ã¦ãã¦)ã¡ããã©ããããã¨è¿äºãããã»ã©ã§ããã¡ãªã¿ã«ç¼ããã°ã¯å¥ã®ã¹ã¿ããã製é æ å½ãã¦ãã¾ãã
âã¹ã¿ããã¨ç²¾ç®ã«é¢ãã¦
åºæ¬çã«ã¯è¥ã人ãä¸å¿ã¨ãªã£ã¦åºãåãã¦ãã¾ãããããããã®ä¸ã§ã主ã«ç·æ§ãä¸å¿ã¨ãªã女æ§ã¹ã¿ãããå¨ããåºãã¦ããæãã§ããã®ä¸å¿ã¨ãªãç·æ§ãæ¥ã«ãã£ã¦å¤ããã¾ãã客観çã«è¦ã¦ããåãã¦(åãã¦)ã¯ããã¨è¨ãã¾ãããè¥ãããã«æ¥å®¢ã¬ãã«ã¯æºç¹ã¨ã¯è¨ãã¾ãããã®ãªã®ãªã»ã¼ãçãªè¨ãåãã¨é è³ã»ååæã®åä½ã§ãã客ã«ãã£ã¦ã¯ä¸æºã«æãããç¥ãã¾ããããç§ã¯æ°ã«ããã®ãããã¾ãããããããåºãªãã ã¨å²ãåã£ã¦ãã¾ãã
ä»åæ°ã«ãªã£ãã®ã¯ã¬ã¸ç²¾ç®ã§ãããã¬ã·ã¼ãã¯ãå ¥ç¨ã§ãããã¨ããèãã»ãªãã§ãç§ã¯å¿ ãããã ãããã¨è¨ãã¾ãããã®ã¬ãã¥ã¼ãæ¸ãæã«å¿ è¦ã ããã§ãã
â¼â¼â¼â¼â¼
ã¨ãããä»åããã®ã¬ã·ã¼ããåãåã£ã¦åºå¤ã«åºã¦ããä½æ°ã«æç´°ã確èªããã¨ãçä¸ 3ãã¨å°åããã¦ãã¾ããããã®ã¬ãã¥ã¼ã®åçãè¦ã¦ãåããããã«ãç§ã¯çä¸ã¯1æ¯ãã飲ãã§ãã¾ãããããããã¤ãã¼ã«ã®æç´°ãæãã¦ãã¾ããã¤ã¾ãã
ãã¬ã·ã¼ãã
ãé³¥ã¶ãããã1 200
ãçä¸ãããã3 570
ãå®éã(飲é£é )
ããã¤ãã¼ã«ã1 150
ãé³¥ã¶ãããã1 200
ãçä¸ãããã1 190ã¨ãããã¨ã§è¸µãè¿ãã¦åºã«å ¥ãç´ãã¬ã¸ä¿ããã¦ããç·æ§(ä¸å¿ã¨ãªã£ã¦åãã¦ãã人)ã«ç¢ºèªããã®ã§ããããã¨ä¼è©±ã®éä¸ã«æ¨ªããè¥ã女æ§ã¹ã¿ãããå ãã£ã¦ãã¦ãé»åã使ã£ã¦è¨ç®ãå§ãã¾ãããããã«å·®é¡ãæ±ããããã§ã(ã«ã¼ãæ¯æãã ãã©)ãè¿ãã¯ç¾éã«ãªãã¾ããã¨ãå·®é¡ã§ããã253åãæ渡ãã¦ããã¾ããã
å®ã¯ãã®å¥³æ§ãããã¡ãããä»è¾¼ã¿ããã¦ããå¨æ¿ã¨åãå ´æã§åãã¦ããã®ã§ãããâå¾ãåãâã®è¡¨æ ã¨æ 度ã§ä½ã¨ãªãä»äºã«å¯¾ãã¦æ¶æ¥µçã«è¦ããã®ã§ããæ°ãããã¤ããããã¨æã£ã¦è¦ã¦ããã®ã§ããããã®ã¬ã¸ç²¾ç®å¯¾å¿ãè¦ãã¨ããã§ããªããããªã®ã§ããè¨ç®ã¯å¾æã¨ããã¨ããã§ããããã
ã¡ãªã¿ã«æ¤ç®ãã¦ã¿ãã¨ã
誤ï¼(200+190x3)x1.1=847
æ£ï¼(150+200+190)x1.1=594
å·®é¡ï¼747-594=253ã¨ãããã¨ã§åã£ã¦ãã¾ãããã ãç·æ§ã¹ã¿ããã¨ç§ã¨ã®ããã¨ãã®éä¸ã§å ¥ã£ã¦æ¥ãã®ã«ãããããããè¿ éãã¤æ£ç¢ºã«å·®é¡ãè¨ç®ã§ããã®ã¯å°ã ä¸æè°ã§ãããããã§ãããªã¼ãã¼å±¥æ´ã¨ã¬ã·ã¼ããæ¯è¼ããã®ã§ããããç§ã«éãã客ã®è¨èã¯ææ§ãªå ´åãããã®ã§(åºæ¬çã«é ã£æããªã®ã§)ãæ®éãªã確èªã®ããã«åç²¾ç®ã«ã¯æéããããã¯ãã§ãã
ã¨ããããä¸æè°ãªã®ã¯ã¬ã·ã¼ãã«ã¯ééããããã®ã«ãªã¼ãã¼ã¯æ£ããåãä»ãããã¦é è³ãåé¡ãªãã£ãäºå®ã§ãã
ãã以éã¯æ³åã§ããããªã¼ãã¼ã·ã¹ãã (ã¹ã¿ãããã¹ããã§å注ãã¦ãã)ã¨ã¬ã¸ã·ã¹ãã ããã¾ãåæãåãã¦ããªãã®ã§ã¯ãªããã¨æãã®ã§ãã
â¶ï¸å注ã¨ã³ããªã¼âå¨æ¿ã¸ã®ãªã¼ãã¼æ示âé è³
â¶ï¸é è³ã¨ã³ããªã¼âã¬ã¸ã·ã¹ãã ã¸éä¿¡é è³æ¸ã¿ã®æç¹ã§ã®å ¥åæã«ãã¼ãã«çªå·ãééãã¦å ¥åããã¨ãã®ãããªçµæã«ãªãå¯è½æ§ã¯èããããã®ã§ããå®éã®ã·ã¹ãã ãè¦ãããã§ã¯ãªãã®ã§ããã¾ã§æ³åã§ããã©ã
å®ã¯ãã®ç¾è±¡ã¯æè¿è¡ã£ã¦ããä»ã®å± é å±ã§ãçµé¨ãã¦ãã¦ãç§ã¯çä¸ã¯ã»ã¨ãã©é ¼ã¾ãªãã®ã§ããããªããã¬ã·ã¼ãã«å°åããã¦ãããããã®ã§ã(ããã1ã¶æã®éã«2åã)ããã®å± é å±ãã¹ããã¨ã¿ãã¬ããã使ã£ããªã¼ãã¼ï¼ãã§ãã¯ã·ã¹ãã ã使ã£ã¦ãã¾ãã
大æµã¯èªå® ã«å¸°ã£ã¦ã¬ãã¥ã¼ãæ¸ã段éã§æç´°ãè¦ç´ãã®ã§ãããä»åã¯ç¬¬å æ(ï¼)ãåãã¦ããã«ç¢ºèªãã¦æ°ã¥ããã¨ããããã§ãããã®æç´°éãã«é¢ãã¦ã¯ãã¯ãä»ã®æ稿è ãæ¸ãã¦ããããã¾ãããããèªãã æã«ã¯ããããããã¨ã§ããªãã ãããã¨æã£ã¦ããã®ã§ãããå®éã«èªåãçµé¨ãããã¨ã«ãªã£ã段éã§ãæ®éã«ããå¾ããããã¨æãããã«ãªãã¾ããã
ã¤ã¾ãä»åã®å¥³æ§ã¹ã¿ããã®ã¹ã ã¼ãºãªå¯¾å¿ã¯ãéå»ã«ä½åãçµé¨ãããããªã®ããç¥ãã¾ããããã ãã®ãããªééããä¸äººã®å®¢ã«èµ·ãã£ãå ´åãå°ãªãã¨ãããä¸äººã®å®¢ã«ãå½±é¿ããã¯ãã§ããã¤ã¾ããå·®é¡ã®253åã¯ãã£ã¡ã®å®¢ã¸ãâéå·®é¡âã¨ãªã£ã¦ããã¯ããªã®ã§ããåºã¨ãã¦è«æ±é¡ã¯ãã¼ã¿ã«ã§ã¯åã£ã¦ããã¯ããªã®ã§ãç§ã«è¿ãã253åã¯ã©ããã§ååããªãã¨åããªããã¨ã«ãªãã¾ããçµæã¨ãã¦ã¬ã¸ãããéã«ç¾éã«éä¸è¶³ãçºçãã¦ãã¾ãã¾ãã
ãã®è¾ºãã¯ã©ãå¦çããããæ°ã«ãªãã¾ãããæ¥å¸¸çã«çºçããããªã¹ã¯ã¨èãã¦ãéåå ¥(éæ失)æ±ãã«ã§ããã¦ããã®ã§ããããã
ãã®è«æ±é¡ã®ééãã¯éå»ã«ç¥æ¸ã®é¤åå°éåºã§ãçµé¨ãããã¨ãããã¾ãããã®åºã§ã¯äººã«ãããªã¼ãã¼ã ã£ãã®ã§åç´ãªãã¥ã¼ãã³ã¨ã©ã¼ãªã®ã§ãããé£ã®äººã追å 注æãã¦é£ã¹ãé¤åã®åãç§ã®æ¹ã«ã¤ãã¦ããã®ã§ãããã£ã¨ã¹ã¿ããã追è¨ããéã«ä¼ç¥¨ãééããã®ã§ãããã
ãããæ©æ¢°ã便å©ã«ãªã£ã¦ã人ãä»å¨ããéããã®ãããªãã¹ã¯èµ·ããå¾ãããã§ãä¾ã®æ ª1å売買ã®ãããªãã¨ãçºçããã®ã§ããããã
â²â²â²â²â²
âããã¡ããé¢ãã¦
ä»åããå«ããããããã¨ãåããã¾ããããã®ä»¶ã§å°ãã話ããã¾ããããããéãããããã ãããã¨è¨ããªãããå¬ãããã«åãã¦ãã¾ããããã¨ãã¤ã¨ããã«é¢ãã¦ãä¾ã®ãªã¼ããã¡ã¸ã¼(â»)ã®ä»¶ã¯ç¥ã£ã¦ããããã§ããç§ããã£ã¦ã¿ããããªãã¨è¨ã£ã¦ãã¾ããããæ©æããå¤æ¹ã¾ã§ã®å¤åãªã®ã§é£äºã®æéãä¸è¬çã§ã¯ãªãã16æéã®ç©ºç½æéãç¡çãªã確ä¿ããã®ãé£ãããã§ããã
(â»1æ¥ã®ä¸ã§16æé以ä¸é£äºãæããªãæéã確ä¿åºæ¥ãã°ãä½å ã«èç©ãããä½åãªãã®ãæ¶è²»ããçµæçã«ãã¤ã¨ããã«ãªãã¨ããçè«(èªå解é)ãåºæ¬çã«ã¯ç¡ç ææãæããã¨ã§ç¡çãªããã®æéã確ä¿ã§ãããå ·ä½çã«ã¯æé£ãæãã¦æ¼é£ã¨å¤é£ã¯æ®éã«é£ã¹ããã¨ã§ãä¾ãã°20æããç¿12æã¾ã§é£ã¹ãªããã°16æéçµéãâãªã¼ããã¡ã¸ã¼âãåãã¨ãããã¨ã«ãªããç§ã1年以ä¸ç¶ãã¦ãã¦æ¼ãå¤ã«(ã¬ãã¥ã¼ãæ¸ãããï¼)好ããªãã®ãé£ã¹ã¦ãã¦ãçµæçã«4kgã»ã©ä½éãè½ã¨ãã¦ä»ã¯å®å®ãã¦ããããã以ä¸ã¯è½ã¡ãªããè½ã¨ãå¿ è¦ããªãã¨æã£ã¦ãããã)
以ä¸ãé·æã«ãªã£ã¦ãã¾ãã¾ãããã次åã¯ããã¡ãããªã¹ã¹ã¡ã®ãæ太åããããµã©ããã¨ãæªé£ã®ç¼ãé³¥ãé£ã¹ããã¨æãã¾ãã
ãã¡ãããã¾ã§ããã
追è¨ï¼
ãããã¡ãããéå£ä¸çªãã¤ã³ã¹ã¿ã«æ¸ããï¼ãã¨èãã®ã§ããç§ã¯ã¤ã³ã¹ã¿ã¯ãããã¨ãæ¸ãã¦ããªãã®ã§ãããããããé£ã¹ãã°ï¼ãã¨è³ªåè¿ãããã¾ããã(ã¤ã¥ã)â4,000æåè¶ ã§ã¢ããªãè½ã¡ã
ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼è»¢è¨çµããï¼ä¿åç¨ï¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼
ã¾ãããããããªãã®ã§åã¢ããããéã«ã¯ææç®æãå²æãããããªãã¨ã¯æãã¾ãããã£ããæéãããã¦æ¸ããã®ã«ããªãã¦ãå®ã¯æãã¤ãã¾ã¾æã¡è¾¼ãã ã ããªã®ã§ããããªã«æéã¯ããã¦ããªãã®ã§ãããªã®ã§é§æã¬ãã¥ã¼ã¨ãªã£ã¦ãã¾ãã
(çµãã)
Â
ãã«ã¼ã¬ã¤ã®æ²å
é³å£°ãæ åã¡ãã£ã¢ã¨ãããæ±ãæ©å¨ã¯æ代ã¨å ±ã«ã©ãã©ãé«æ§è½åãã¦ãã¾ããéæ¦è¶ãã®ç§ã¯ãã®æµãã«ã©ã£ã·ãã¨æµ¸ãããªããçãã¦ããæãããã¾ãã
ãã¡ãã£ã¢ã
â«ã¬ã³ã¼ã
â«ã«ã»ãããã¼ã
ð¬ãããªãã¼ã
ð¬ã¬ã¼ã¶ã¼ãã£ã¹ã¯
â«CD
ð¬DVD
ð¬ãã«ã¼ã¬ã¤
ï¼ç§ã使ç¨ãã¦ããªãMDããã¸ã¿ã«ã¡ãã£ã¢ãªã©ã¯çç¥ï¼
æè¿ã§ã¯æå¤è¶£å³ã¨ããããã¡ã«ã«ãªã§ããããâï¼ãã©âãï¼ãã©ãã¯ãã¼ãããã³åçè£ ç½®ãå ¥æãã¾ããããããã¯ãªã¢ã«ã¿ã¤ã ã§ã¯è¦ããã¨ããç¨åº¦ãªã®ã§ãããå²æãã¾ããï¼ã«ã»ãããã¼ãã®å¤å½¢çã¨ãè¨ãã¾ããï¼
é«æ§è½åã«ä¼´ãå®éã®ä½¿ç¨æã®ãã©ãã«ãä¸æºç¹ãå¤ããªã£ã¦ããããã«æãã®ã§ããããããã®æ¥è¨ã®æ¬é¡ã§ããâã·ã³ãã«ã¤ãºãã¹ãâãå®æãã¦ããæ¯æ¥ãªã®ã§ãã
Â
ããã§ãã¿ã¤ãã«ã«ããããã«ãã«ã¼ã¬ã¤ã«çµã£ã¦ããã¾ã§ã®çµç·¯ãã¾ã¨ãã¦ã¿ããã¨æãã¾ããã»ãã¨ã¤ã©ã£ã¨ãããããªãã¨ã°ãããèµ·ããã®ã§ãã
10年以ä¸åã«DVDã¬ã³ã¼ãã¼ãããã«ã¼ã¬ã¤ã¬ã³ã¼ãã¼ã«è²·ãæ¿ãã¾ããï¼ã¨ãããä¸æçã«ã¯ä½µç¨ãã¦ããï¼ã確ãã«TOSHIBA製ã®DVDã¬ã³ã¼ãã¼ãé«æ©è½ã ã£ãããã©ãã«ã¯ãªãã£ãããã«è¨æ¶ãã¦ãã¾ããèµ·åãé ãã¨ãæ©è½ãç´°ãããã¦è§£ãã«ããã¨ãã¯ããã¾ãããã使ãããªãã¿ãããªææ³ãæã£ããã¨ã¯ãªãã£ãã¨æãã¾ããå®ã¯ãªãã©ã¤ã³ã§ä»ã§ã使ããããã«ã¯ãã¦ãã¾ããDVDï¼VHSã¨ãããã¤ããªããä»æ§ãªã®ã§ãæã®VHSãã¼ããªã©ã®DVDåãªã©ã«éå®ãã¦ãã¾ãã
æåã«è²·ã£ãã®ã¯SONY製ã®ãã«ã¼ã¬ã¤ã¬ã³ã¼ãã¼ã ã£ãã®ã§ãããè³¼å ¥æããæ°å¹´ã¯å¿«é©ã«ä½¿ãã¦ããã®ã§ãããå¾ã ã«èª¿åãæªããªã£ã¦ãã¾ãããåºæ¬æ©è½ã¯åé¡ãªãã®ã§ããã¡ãã£ã¢ã®èªèæã«æå³ä¸æãªåä½ãããã®ã§ããè¦ã¯ãã«ã¼ã¬ã¤ã®åç¤ããã¬ã¤ã¤ã¼ã«èªã¿è¾¼ã¾ããã¨ãã®åãã§ãã
ã»èªèããªãï¼ãã®ã¡ãã£ã¢ã¯ä½¿ç¨ã§ãã¾ããï¼
ã»è¨é²å½¢å¼ãç°ãªã£ã¦èªèãããï¼ãããªã¯åçã§ãã¾ããï¼
å¤ãçºçããã®ãèªèã¨ã©ã¼ã§èªåèªèº«ã§é²ç»ããã¡ãã£ã¢ãåã»ããããã®ã«èªèã§ããªãã®ã§ããä»ç¤¾ã®ãã®ãªãäºææ§ã®åé¡ã§æãå¾ãç¾è±¡ããç¥ãã¾ãããããã®åä½ã§é²ç»ããã¡ãã£ã¢ãèªèã§ããªãã®ã¯ã©ãèãã¦ãããããã§ãããããã¯ããããªãã©ã¼ãããã¨èªèãããã«ãã¼ã¿ãã£ã¹ã¯ã¨ãã¦èªèããã¦ãã¾ããã¨ãããã¾ããã
ä¸è¨ã®ç¾è±¡ãå¾ã ã«å¢ãã¦è¡ãã¾ãããå½åã¯ãã³ãªãæ±ãã®ãããã¨æãã¯ãªã¼ãã³ã°ãã£ã¹ã¯ãªã©ã使ã£ã¦ãã©ã¤ããã¯ãªã¼ã³ã¢ãããã¾ããããç¾è±¡ã¯æ¹åãã¾ããã§ããã
å æã¾ã§ã¯ãããªç¶æ³ã§ã ã¾ãã ã¾ã使ã£ã¦ãã¨ãããSONYãããããªã¡ã¼ã«ãå±ãã¾ããã
ãã使ãã®ã¬ã³ã¼ãã¼ã¯å½ç¤¾ã¢ããªã®å¯¾è±¡å¤ã«ãªãã¾ãã
ãã®ã¢ããªã¯ãããçµç±ã§é²ç»çªçµã®ç¢ºèªãäºç´ãåºæ¥ããã®ã§ãçµæ§æ°ã«å ¥ã£ã¦ä½¿ã£ã¦ããã®ã«ããããªãæ§æ©ç¨®ã¯åãæ¨ã¦ãã¨è¨ãããã§ãã確ãã«10年以ä¸æã®æ©ç¨®ããµãã¼ããç¶ããã®ã¯é£ããã®ããç¥ãã¾ããããããªãã·ã§ãã¯ãåããã®ã¯ç¢ºãã§ãããã®ã¢ããªã®ä½¿ç¨é »åº¦ã¯SNSç³»ã®ã¢ããªã¨åããããé«ãã£ãã®ã§ãã
ãã©ãã«ãå¤ããªã£ã¦ãããã¨ããã£ã¦ããã®ã¡ã¼ã«ãæ¥ãã¨ããã£ããã¨ãªããè²·ãæ¿ãããããªãããã¨æãããã«ãªãã¾ããããããåãSONYã®ææ°æ©ç¨®ã«ããããã¨æãã¾ããããããæ®éã®æµãã ã¨æããSONYã®ç®è«è¦ãããã ã¨æãã¾ãã
ã ããããã
念ã®ããã«ç§ãè²·ãæ¿ãåè£ã«ããæ©ç¨®ã®ãããä¸ã§ã®è©ä¾¡ãè¦ã¦ã¿ãã®ã§ããã»ã»ã»
ã»å
¨ä½çã«åå¿ãé
ãã¤ã©ã¤ã
ã»æä½æ§ãæ§æ©ç¨®ã¨å
¨ãç°ãªã£ã¦ãã
ããããåä¸ã¡ã¼ã«ã¼ã«è²·ãæ¿ããçç±ããªããªã£ã¦ãã¾ãè¦ç´ ã«ãªãã¾ããä»ã®æ©ç¨®ãããµã¯ãµã¯åããããæä½æ§ã«æ £ãã¦ãããããã§ãã¬ãã¥ã¼ãè¦ã¦å¤±æããã®ã§ããSONYããããã ããªã®ããã¨ã
ããã§åä¸ã¡ã¼ã«ã¼ã¸ã®è²·ãæ¿ãã諦ãï¼ã¨ããããªã»ãããã¦ï¼æ©ç¨®é¸ã³ããããªããã¾ãããçµå±ãPanasonicã®ã¬ã³ã¼ãã¼ã«æ±ºå®ããã®ã§ãããããåºæ¬ã¹ããã¯ã¯åçãªã®ã«SONYã®ãã®ããå®ãã®ã§ãã確ãã«å®ãã®ã«ã¯çç±ãããã®ã§ãããç§ãæ±ããã¨ããã§ã¯ãªãã®ã§ç¡è¦ã§ãã¾ããï¼ãããã¯Wi-Fiã®ã¿ã¨ãå ¨é¢ããã«ã«è¡¨ç¤ºã¦ãããããªãã¨ãï¼
ã¾ãåä½èªä½ãã¹ãã¬ã¹ãªãå¿«é©ã§ããã¨è©ä¾¡ãã¦ãã¾ããã¾ãä»ã¯ãããçµç±ã§è¦è´ãããäºç´ãã¦ãããããç´æ¥ã¬ã³ã¼ãã¼ãæä½ãã¦ããªãã®ã§å®éã®æä½æã¯æ¯è¼ã§ããªãã®ã§ãããã¿ã¤ã ã©ã°ãçºçããå¯è½æ§ã®ãããããçµç±ã§ã®æä½ã§åé¡ãªãã¨ãããã¨ã¯ãç´æ¥åçã§ãåé¡ãªãã¨ãã解éãå¯è½ã ã¨æãã¾ãã
çµæçã«ã¯æ°ããæ©ç¨®ã«ã¯ã»ã¼æºè¶³ãã¦ãã¾ããç´°ããç¹ããããã°ããããªãã®ã§ãããå°ãªãã¨ãSONYã®ã¬ã³ã¼ãã¼ï¼æ§æ©ç¨®ï¼ãããåã¡ããæºè¶³åº¦ã«ãªã£ã¦ãã¾ãã1çªå¤§ããã®ããããçµç±ã§ã¹ãããã¿ãã¬ãããPCã§é²ç»å 容ãTVæ¾éãè¦ãããç¹ã§ããèªå®¤ã«TVããªãï¼ã¨ãããã¢ã³ããç·ãé ç·ããã¦ããªãï¼ã®ã§ãä»ã¾ã§ã¯ãããã®é ä¿¡ã§é©å½ã«éã«åããã¦ããã®ãããªã¢ã«ã¿ã¤ã ã«è¦ããã¨ãå¯è½ã«ãªã£ãããé²ç»ããå 容ãèªå®¤ã§è¦ãéã«å¾æ¥ã¯ãã¡ãã¡ã¡ãã£ã¢ã«æ¸ãè¾¼ãã§ãèªå®¤ã«ãããã¬ã¤ã¤ã¼ã§è¦ã¦ããã®ã§ãï¼ã¬ã³ã¼ãã¼èªä½ã¯å± éã«ããï¼ã
ãããã®ç¹ãä¸æ°ã«è§£æ¶ããã®ã§ç¾ç¶ã¯å¿«é©ãªè¦è´ãåºæ¥ã¦ãã¦ããªãæºè¶³ãã¦ããã®ã§ãã確ãã«ãããçµç±ã§è¦è´ã§ããããã«ããã¾ã§ã®è©¦è¡é¯èª¤ï¼Wi-Fiã«ã¼ã¿ã¼ã®æ°èª¿ãã¢ããªã®è¨å®ãªã©ï¼ã¯ãã£ãã«ãããæçµçã«ã¯å¸æããæ©è½ã使ããããã«ãªã£ãã®ã§åé¡ã¨ã¯æã£ã¦ãã¾ãããï¼ã¨ããããã®åæ段éã1çªæ¥½ããã£ããããï¼
ãã®ç°å¢ã«ããã«ãæ°ãæåã«å°å ¥ãã液æ¶ããã¸ã§ã¯ã¿ã¼ãçµã¿åããã¦ãâãªãã¡ãã£ã¦âãã¼ã ã·ã¢ã¿ã¼ãå ªè½ããæ¯æ¥ãç¶ãã¦ãã¾ãããã®æ¶²æ¶ããã¸ã§ã¯ã¿ã¼ãéå»ããã®å°å ¥æ´ãããããããã®ã§ããããã®ä»¶ã¯ã¾ãå¥éã¾ã¨ãã¦ã¿ããã¨æãã¾ãã
追è¨ï¼é²ç»ç¨ã®ãã«ã¼ã¬ã¤ãã£ã¹ã¯ã®èªèã£ã¦ã©ããã¦ãããªã«é ãã®ã ãããï¼åºæ¬ä»æ§ããã«ãã»ãã·ã§ã³ã ãããããããªãã®ã ãããã©ã»ã»ã»
森æèª ä¸æ°ãå²ã¶
2023å¹´7æ24æ¥ã«ãã¹ããªã¼ä½å®¶ã®æ£®æèª ä¸æ°ã亡ããªãã¾ããã享年90ã
æ°ã®ä½åã«åºåã£ãã®ã¯ãã»ã¼åä¸ç´åã®é«æ ¡çã®æãå¦æ ¡ã®è¿ãã®æ¬å±ã§ãªã«ãã«æã«ãããé«å±¤ã®æ»è§ãã¨ããæ庫æ¬ã§ãããè表ç´ã«ã¯ã¿ã¤ãã«ãä½è å以å¤ã«âä¹±æ©è³åè³âã¨å°å·ããã¦ãããå½æãæ±æ¸å·ä¹±æ©ã®ä½åãèªãã§ããã®ã§ããã®ã¤ãªããã§èå³ãæã¡ã¾ããã
ãã®ä½åãèªãã ãã¨ããã£ããã§âæ¬æ ¼ãã¹ããªã¼âã®ä¸çã®é¢ç½ããç¥ã£ãç§ã¯ãæ°ã®ä½åãæå½ãã次第ã«èªã¿ã¾ãããæã«ã¯å¾¹å¤ãã¦ã¾ã§ã
çµå±ãæ°ã®ä½åã¯ç¤¾ä¼äººã«ãªã£ã¦ãããå¢ãç¶ããèªå®¤ã®æ¬æ£ã®å¤§é¨åãå ããã¾ã§ã«ãªãã¾ããããã¡ããä»ã®ä½å®¶ã®ä½åãè²·ã£ã¦ã¯ãã¾ãããã森ææ°ã®æ庫æ¬ã¯ç¸å½æ°ã«åãã ã®ã§ããæ¬æ£ã«ä¸¦ã¹ãã¨ä¸»ã«è§å·æ庫ã®é表ç´ãç®ç«ã£ã¦ããããããããæ¬å±ã§ãèªç¶ã«éãè²ãæ¢ãã¦ãã¾ãæ¯æ¥ã§ããã
森ææ°ã¯ä½å®¶æ´»åãéå§ããå½åã¯ããã«ã山岳ããã¼ãã«ãããã¹ããªã¼ãä¸å¿ã§ããããããã¦äººéæ§ã社ä¼åé¡ãæ±ãããã«ãªããå¹ åºãåéã§ä½åãæä¾ãã¦ããã¾ãããå¾å¹´ã«ã¯æ代å°èª¬ãªã©ãæ¸ããã¦ãã¾ããããç§èªèº«ã¯åéçã«å¥½ã¿ã§ã¯ãªãã£ãã®ã§ãæ°ã®ãã¹ã¦ã®ä½åãèªç ´ããã¾ã§ã«ã¯ããã¾ããã§ããã
æ®å¿µãªããææ¨é¢ã®ä¸ç°ã§å»å¹´ã«æ°ã®ä½åã®èµæ¸ãææ¾ãã¦ãã¾ãã¾ããããæå ã«ã¯ãé«å±¤ã®æ»è§ãã ãã¯ä¿åãã¦ãã¾ãããã ãç´ã®æ¸ç±ã¯å ¨ä½çã«åãå°ããã®ã§ãæ©ä¼ãè¦ã¦ãé«å±¤ã®æ»è§ããå§ãã¨ããâãã1度èªã¿ããä½åâã«é¢ãã¦å度é»åããã¯çãè³¼å ¥ãããã©ã³ããµã¤ãºã大ãããã¦èªã¿ç´ãã¦ã¿ããã¨æã£ã¦ãã¾ãã
森æèª ä¸ãããå®ããã«ãç ããã ããã
Â
ãã£ã±ã趣å³ã®ããã°ã©ãã³ã°ã¯æ¥½ããï¼Part6/endï¼
ï¼Part5ããï¼
Â
å®ã¯å¥ã®ããã°ã©ã ã½ã¼ã¹ãå ã«ãChatGPTã«ãªãã¼ã¹ã¨ã³ã¸ãã¢ãªã³ã°ããããã¨ãããã¾ãããè¦ã¯ãã½ã¼ã¹ã³ã¼ããããä»æ§æ¸ããä½ãããã®ã§ãããã®æã¯ããªãã®ç²¾åº¦ã§âçæâã§ããã®ã§ãä»åå®æããããã°ã©ã ã«ã¤ãã¦ãä½ããããã¨ã«ãã¾ããã
Â
以ä¸ã®ã½ã¼ã¹ããã°ã©ã ãããããã°ã©ã ä»æ§æ¸ãä½æãã¦ãã ããã
ã»ããã°ã©ã ã®æ¦è¦
ã»ã²ã¼ã ã®éã³æ¹
ã»ã¡ã½ããã®ä¸è¦§
ã»å¤æ°ä¸è¦§è¡¨
ã»ä»æ§ã®æ¡å¼µæ¡
/*
 * ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã
 *     original copyright 1978 by N.Tsuda
 *     convert & arrange to Java version by T.Sunahachi 2023
 */
import java.util.InputMismatchException;
import java.util.Random;
import java.util.Scanner;
public class TofuGame {
  static int STARTGOLD = 5000;   // éå§æã®ææé
  static int GOALGOLD = 30000;   // ç®æ¨éé¡
  static int TOFUBAIKA = 50;   // ãã¼ãã®å£²ä¾¡
  static int TOFUGENKA = 40;   // ãã¼ãã®å価
  static int SELLMAX = {500, 200, 100};   // 天æ°ãã¨ã®æ大売ä¸åæ°
  static String TENKIWORDS = {"æ´ã", "æã", "é¨"};   // 天æ°ã表ãè¨è
  Â
  static int hare;         // æ´ãã®ç¢ºç
  static int kumori;       // æãã®ç¢ºç
  static int ame;         // é¨ã®ç¢ºç
  private static Random random = new Random();
  // ã¡ã¤ã³ã¡ã½ãã
  public static void main(String args) {
    Scanner scanner = new Scanner(System.in);
    String input;
ï¼ä»¥ä¸ç¥ï¼
Â
ããã¨ããããªæãã®æç« ãåºæ¥ä¸ãã£ã¦ããã®ã§ããâ¦â¦ï¼ã¬ã¤ã¢ã¦ããä¹±ãã¦ããã®ã¯ãHatenaBlogã®ã¨ãã£ã¿ã®åæãªæåã®ããï¼
ããã°ã©ã ä»æ§æ¸
ããã°ã©ã ã®æ¦è¦:
ãã®ããã°ã©ã ã¯ãã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã ãã¨ããã²ã¼ã ãå®è¡ãããã®ã§ãããã¬ã¤ã¤ã¼ã¯ãã¼ãå±ãçµå¶ããç®æ¨éé¡ãéæãããã¨ãç®æãã¾ãããã¬ã¤ã¤ã¼ã¨ã³ã³ãã¥ã¼ã¿ã交äºã«ãã¼ããä½ãã天åã«å¿ãã¦ãã¼ãã売ãã¾ãã売ä¸ã«åºã¥ãã¦ææéãå¢æ¸ããå ã«ç®æ¨éé¡ã«å°éãããã¬ã¤ã¤ã¼ãåå©ã¨ãªãã¾ããã²ã¼ã ã®éã³æ¹:
a. ããã°ã©ã ãå®è¡ããã¨ããã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã (Javaç)ãã¨è¡¨ç¤ºããã¾ãã
b. ã«ã¼ã«èª¬æã表示ãããã©ããå°ãããã¾ãã"y"ãå ¥åããã¨ã«ã¼ã«ã表示ããã¾ãã
c. ã²ã¼ã ãéå§ããããã¬ã¤ã¤ã¼ã¨ã³ã³ãã¥ã¼ã¿ã交äºã«ãã¬ã¤ãã¾ãã
d. ã²ã¼ã çµäºå¾ããã¬ã¤ãç¶ãããã©ããå°ãããã¾ãã"y"ãå ¥åããã¨ã²ã¼ã ãç¶ç¶ããã¾ãã
e. ç®æ¨éé¡ã«å°éãããã¬ã¤ã¤ã¼ãåå©ã¨ãªããã²ã¼ã ãçµäºãã¾ããã¡ã½ããã®ä¸è¦§:
- main(String args): ããã°ã©ã ã®ã¨ã³ããªã¼ãã¤ã³ããã²ã¼ã ã®ã¡ã¤ã³å¦çãå¼ã³åºãã¾ãã
- displayRules(): ã²ã¼ã ã®ã«ã¼ã«èª¬æã表示ãã¾ãã
- gameMain(): ãã¼ãå±ã²ã¼ã ã®ã¡ã¤ã³å¦çãå®è¡ãã¾ãã
- tenkiYohou(): 天æ°äºå ±ã表示ãã¾ãã
- randomNum(int max): æå®ãããæ大å¤ã¾ã§ã®ä¹±æ°ãçæãã¾ãã
- inpTofu(int limit): ãã¬ã¤ã¤ã¼ãä½æãããã¼ãã®åæ°ãå ¥åãã¾ãã
- compTofu(int limit, int player): ã³ã³ãã¥ã¼ã¿ãä½æãããã¼ãã®åæ°ã決å®ãã¾ãã
- nextTenki(): ç¿æ¥ã®å¤©åã決å®ãã¾ãã
- soldTofu(int tenki, int make): 売ãããã¼ãã®åæ°ãè¨ç®ãã¾ãã
å¤æ°ä¸è¦§è¡¨:
STARTGOLD
: éå§æã®ææé (åæå¤: 5000)GOALGOLD
: ç®æ¨éé¡ (åæå¤: 30000)TOFUBAIKA
: ãã¼ãã®å£²ä¾¡ (åæå¤: 50)TOFUGENKA
: ãã¼ãã®å価 (åæå¤: 40)SELLMAX
: 天æ°ãã¨ã®æ大売ä¸åæ°ãæ ¼ç´ããé å (åæå¤: [500, 200, 100])TENKIWORDS
: 天æ°ã表ãè¨èãæ ¼ç´ããé å (åæå¤: ["æ´ã", "æã", "é¨"])hare
: æ´ãã®ç¢ºçkumori
: æãã®ç¢ºçame
: é¨ã®ç¢ºçrandom
: ä¹±æ°çæã«ä½¿ç¨ããRandomã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹scanner
: å ¥åãåãåãããã®Scannerã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹input
: ã¦ã¼ã¶ã¼ã®å ¥åãæ ¼ç´ããå¤æ°playerMake
: ãã¬ã¤ã¤ã¼ãä½æãããã¼ãã®åæ°computerMake
: ã³ã³ãã¥ã¼ã¿ãä½æãããã¼ãã®åæ°playerSold
: ãã¬ã¤ã¤ã¼ã売ã£ããã¼ãã®åæ°computerSold
: ã³ã³ãã¥ã¼ã¿ã売ã£ããã¼ãã®åæ°playerProfit
: ãã¬ã¤ã¤ã¼ã®å©çcomputerProfit
: ã³ã³ãã¥ã¼ã¿ã®å©çplayerGold
: ãã¬ã¤ã¤ã¼ã®ææécomputerGold
: ã³ã³ãã¥ã¼ã¿ã®ææéä»æ§æ¸ã®æ¡å¼µæ¡ï¼
é£æ度è¨å®ã®è¿½å
ç¾å¨ã®ããã°ã©ã ã§ã¯ããã¼ãã®ä½ææ°ã売ä¸åæ°ãªã©ã®è¦ç´ ãã©ã³ãã ã«æ±ºå®ããã¦ãã¾ããæ¡å¼µã¨ãã¦ããã¬ã¤ã¤ã¼ãã²ã¼ã ã®é£æ度ãé¸æã§ããããã«ãã¾ããé£æ度ã«ãã£ã¦ãä½ææ°ã売ä¸åæ°ãªã©ã®ãã©ã¡ã¼ã¿ã調æ´ãã¾ããè¤æ°æ¥ã®ãã¬ã¤
ç¾å¨ã®ããã°ã©ã ã§ã¯ãã²ã¼ã ã¯1æ¥ãã¨ã«ç¹°ãè¿ããã¾ãããæ¡å¼µã¨ãã¦è¤æ°æ¥ã®ãã¬ã¤ããµãã¼ããã¾ãããã¬ã¤ã¤ã¼ã¯æå®ãããæ¥æ°åã ãã²ã¼ã ãé²ãããã¨ãã§ãã¾ããåæ¥ã®çµæãå©çãè¨é²ããæçµæ¥ã«æçµçãªææéãåæã表示ãã¾ããã¤ãã³ãã®è¿½å
ã²ã¼ã ã«ãããªããã©ã¨ãã£ãå ããããã«ãã¤ãã³ãã追å ãã¾ããã¤ãã³ãã¯ã©ã³ãã ã«çºçãã天åã売ä¸æ°ã«å½±é¿ãä¸ãããã¨ãããã¾ããä¾ãã°ãã¤ãã³ããçºçããã¨æ´ãã®ç¢ºçãä¸æãããã売ä¸æ°ãå¢å ããããããã¨ãããã¾ããã¤ãã³ãã®å 容ãå½±é¿ã¯å¤æ§åããããã¨ã§ãã²ã¼ã ã®ã¨ã³ã¿ã¼ãã¤ã¡ã³ãæ§ãåä¸ããã¾ããUIã®æ¹å
ç¾å¨ã®ããã°ã©ã ã¯ã³ã³ã½ã¼ã«ãã¼ã¹ã§åä½ãã¾ãããæ¡å¼µã¨ãã¦ã°ã©ãã£ã«ã«ã¦ã¼ã¶ã¼ã¤ã³ã¿ã¼ãã§ã¼ã¹ï¼GUIï¼ãå°å ¥ãã¾ããGUIã使ç¨ãããã¨ã§ãããç´æçãªæä½ãè¦è¦çãªæ å ±è¡¨ç¤ºãå®ç¾ããã¦ã¼ã¶ã¼ã¨ã¯ã¹ããªã¨ã³ã¹ãåä¸ããã¾ãããã¬ã¤ã¤ã¼ã®ã«ã¹ã¿ãã¤ãº
ãã¬ã¤ã¤ã¼ãèªèº«ã®ãã¼ãå±ãã«ã¹ã¿ãã¤ãºã§ããæ©è½ã追å ãã¾ãããã¬ã¤ã¤ã¼ã¯åºèã®ãã¶ã¤ã³ããã¼ãã®å質ã販売æ¦ç¥ãªã©ãé¸æã§ãã¾ããããã«ããããã¬ã¤ã¤ã¼ã®æ¦ç¥ãé¸æã®å½±é¿ãã²ã¼ã ã«åæ ãããããèªå·±ã®ãã¬ã¤ã¹ã¿ã¤ã«ã«åã£ãã²ã¼ã ä½é¨ãæä¾ãã¾ãããããããããããããã
ï¼ChatGPT)
ä»åã®ãã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã ãã«é¢ãã¦ããã¾ãã¾ãã®ä»æ§æ¸ãåºæ¥ä¸ãã£ãããã§ããã²ã¼ã ã®éã³æ¹ã®é¨åãã¤ãã¤ãã§ããããã以å¤ã¯å®ç§ã¨è¨ãããã¨æãã¾ãã
ç¹ã«ä»æ§ã®æ¡å¼µæ¡ï¼ãã¤ã®ã¾ã«ãâä»æ§æ¸ã®æ¡å¼µæ¡âã«å¤ãã£ã¦ããï¼ã«é¢ãã¦ã¯ãã©ãã©ãææ¡ãã¦ããããã§ãChatGPTã¯ãã®ããããå¾æåéã¨è¨ããã¨ããããã¾ãã
Â
ã¤ã¥ãããé¡ããã¾ã
Â
æ¡å¼µæ¡ã®ã¤ã¥ãã§ãï¼
ãªã¼ãã¼ãã¼ãã®è¿½å
ãã¬ã¤ã¤ã¼ã®ã¹ã³ã¢ãæ績ã追跡ãããªã¼ãã¼ãã¼ãæ©è½ãå®è£ ãã¾ãããã¬ã¤ã¤ã¼ã¯èªåã®æ績ãä¿åããä»ã®ãã¬ã¤ã¤ã¼ã¨ç«¶ãåããã¨ãã§ãã¾ãããªã¼ãã¼ãã¼ãã¯ãæãé«ã売ä¸ãæé·é£ç¶å¶æ¥æ¥æ°ãªã©ã®ææ¨ã§ã©ã³ãã³ã°ããã¾ããããã«ããããã¬ã¤ã¤ã¼å士ã®ç«¶äºãã²ã¼ã ã¸ã®ã¢ããã¼ã·ã§ã³ãé«ã¾ãã¾ããæé·è¦ç´ ã®è¿½å
ãã¬ã¤ã¤ã¼ãã²ã¼ã å ã§æé·ããè¦ç´ ã追å ãã¾ããä¾ãã°ããã¼ãã®ã¬ã·ããæ¹è¯ããããæ°ãã販売æ¦ç¥ãå¦ãã ããããã¨ãã§ãã¾ããæé·è¦ç´ ã¯ããã¬ã¤ã¤ã¼ã®çµé¨ãã¤ã³ããã¬ãã«ã¨ãã£ãå½¢ã§è¡¨ç¾ãããæ°ããªãã£ã¬ã³ã¸ãå ±é ¬ãæä¾ãã¾ãã追å ã®ãã¼ãããªã¨ã¼ã·ã§ã³
ç¾å¨ã®ããã°ã©ã ã§ã¯ããã¼ãã®ç¨®é¡ã¯éããã¦ãã¾ããæ¡å¼µã¨ãã¦ããã¾ãã¾ãªãã¼ãã®ããªã¨ã¼ã·ã§ã³ã追å ãã¾ããè±è 以å¤ã®ææã使ã£ãç¹å¥ãªãã¼ãããå£ç¯éå®ã®ãã¬ã¼ãã¼ãªã©ããã¬ã¤ã¤ã¼ã«ããå¤æ§ãªé¸æè¢ãæä¾ãã¾ããã¤ã³ã²ã¼ã é貨ã¨ã¢ã¤ãã ã·ã§ãã
ãã¬ã¤ã¤ã¼ãã²ã¼ã å ã§ç²å¾ããé貨ã使ç¨ãã¦ãç¹å¥ãªã¢ã¤ãã ãã¢ããã°ã¬ã¼ããè³¼å ¥ã§ããã¢ã¤ãã ã·ã§ãããå®è£ ãã¾ããã¢ã¤ãã ã·ã§ããã«ã¯ãå¹ççãªãã¼ãä½æãã¼ã«ããã¼ã±ãã£ã³ã°ãã£ã³ãã¼ã³ãªã©ããã¬ã¤ã¤ã¼ã®é²è¡ããµãã¼ãããã¢ã¤ãã ãç¨æããã¾ãããã«ããã¬ã¤ã¤ã¼ã¢ã¼ã
è¤æ°ã®ãã¬ã¤ã¤ã¼ããªã³ã©ã¤ã³ä¸ã§ä¸ç·ã«ãã¬ã¤ã§ãããã«ããã¬ã¤ã¤ã¼ã¢ã¼ãã追å ãã¾ãããã¬ã¤ã¤ã¼å士ãååããã競äºããããããã¨ãã§ãã¾ããå ±åçµå¶ã®ãã¼ãå±ããã¼ãä½ãã®å¯¾æ¦ãªã©ããã¾ãã¾ãªãã¬ã¤ã¹ã¿ã¤ã«ã«å¯¾å¿ãã¾ããã¤ãã³ããç¹å¥ãªã¤ãã³ãã¢ã¤ãã ã®è¿½å å®æçãªã¤ãã³ããéå¬ãããã¬ã¤ã¤ã¼ã«ç¹å¥ãªå ±é ¬ãã¢ã¤ãã ãæä¾ãã¾ããä¾ãã°ãå£ç¯ã¤ãã³ãããã¼ãç¥ããªã©ã®ã¤ãã³ããéå¬ããéå®ã®ã¬ã·ããè£ é£¾åãæã«å ¥ãããã¨ãã§ãã¾ããããã«ããããã¬ã¤ã¤ã¼ã¯ã²ã¼ã å ã§ã®é·æçãªèå³ãç¶æãããããªãã¾ãã
ãã£ã¬ã³ã¸ã¢ã¼ãã®è¿½å
ãã¬ã¤ã¤ã¼ã«ç¹å®ã®ç®æ¨ãå¶éãä¸ãããããã£ã¬ã³ã¸ã¢ã¼ãã追å ãã¾ããä¾ãã°ãæéå ã«ã§ããã ãå¤ãã®ãã¼ããä½ããäºç®å¶éå ã§æé«ã®å©çãä¸ãããªã©ã®ãã£ã¬ã³ã¸ãããã¾ãããã£ã¬ã³ã¸ã¢ã¼ãã¯ããã¬ã¤ã¤ã¼ã®æ¦ç¥åãã¹ãã«ã試ãæ©ä¼ã¨ãªãã¾ããã¹ãã¼ãªã¼ã©ã¤ã³ã®æ¡å¼µ
ã²ã¼ã ã«ã¹ãã¼ãªã¼ã©ã¤ã³ã追å ãããã¬ã¤ã¤ã¼ããã¼ããã¸ãã¹ã®ä¸çã§åéºãããè¦ç´ ãæä¾ãã¾ãããã¬ã¤ã¤ã¼ã¯ãã¼ãæ¥çã®æ°ããªå±éããã£ã©ã¯ã¿ã¼ã¨ã®åºä¼ããå°é£ãªé¸æãçµé¨ãããã¨ãã§ãã¾ããã¹ãã¼ãªã¼ã©ã¤ã³ã¯ã²ã¼ã ã®è奮ã¨æ²¡å ¥æãé«ãããã¬ã¤ã¤ã¼ã«ããæ·±ãä½é¨ãããããã¾ããã³ãã¥ããã£æ©è½ã®å¼·å
ãã¬ã¤ã¤ã¼å士ãã³ãã¥ãã±ã¼ã·ã§ã³ãåããããç°å¢ãæä¾ãã¾ãããã¬ã³ããªã¹ãããã£ããæ©è½ãªã©ã®ã³ãã¥ããã£ãã¼ã«ãå®è£ ãããã¬ã¤ã¤ã¼ãæ å ±ãå©è¨ãå ±æããååããã競ãåã£ãããããã¨ãã§ããããã«ãã¾ããã³ãã¥ããã£ã®æ´»çºåã¯ãã²ã¼ã ã®æ¥½ããã¨æç¶æ§ãé«ããå¹æãããã¾ããã²ã¼ã ã®ãã©ã³ã¹èª¿æ´ã¨æ¹å
ãã£ã¼ãããã¯ããã¼ã¿åæãéãã¦ãã²ã¼ã ã®ãã©ã³ã¹ãè¦ç´ããä¸åè¡¡ãªè¦ç´ ãæ¹åãã¾ãããã¬ã¤ã¤ã¼ã®ãã£ã¼ãããã¯ãéè¦ããã²ã¼ã ãã¬ã¤ã®å ¬æ£ãã¨é¢ç½ããåä¸ãããããã«ãï¼ä»¥ä¸ç¥ï¼
ï¼ChatGPT)
ä»åã®çµè«ã¨ãã¦ãï¼ç¡æå©ç¨ã®ç¯å²ã§ã®ï¼ChatGPTã¯ããã°ã©ãã³ã°ã®ä¸çã«ããã¦ã¯ä¸è¨ã®ãããªãã¨ãè¨ããã¨æãã¾ãã
- æ°ããªããã°ã©ã ã®çæã¯åºæ¥ãï¼ä»åã®æ¥è¨ã«ã¯æ¸ãã¦ããªããå®é¨æ¸ã¿ï¼
- æ¢åã®ã½ã¼ã¹ã³ã¼ãã®è¨èªéã®ã³ã³ãã¼ãã¯è¦æ
- ãªãã¼ã¹ã¨ã³ã¸ãã¢ãªã³ã°ã¯åºæ¥ããããã®ä¸ã§ãã¢ã¤ãã¢ã®æä¾ã¯å¾ææ
Â
ã¨ããæãã§ä»åã®ã·ãªã¼ãºï¼ã¯çµããããã¨æãã¾ãã
ãã£ã±ã趣å³ã®ããã°ã©ãã³ã°ã¯æ¥½ããï¼Part5ï¼
ï¼Part4ããï¼
Â
ãã¯ãããã¾ã§ã®ããã°ã©ãã³ã°ä½æ¥ã¯ChatGPTã«ã¯éè·ã ã£ãããã§ãæ¬æ¥ã®âçæAIâã®è½åç¯å²ãè¶ ãã使ãæ¹ã ã¨ã®çµè«ã«éãã¾ãããåãã£ã¦ã¯ãã¾ãããâ¦â¦
çµå±ãä¸éå端ãªåºæ¥æãªãJavaã½ã¼ã¹ãEclipseã«è²¼ãä»ãããããèªåã§ç´ããã¨ã«ãã¾ããããå 容ãã»ã¨ãã©ã§ãããã ã£ãã®ã§ããã®éª¨çµã¿ï¼ã¡ã½ããï¼ãå©ç¨ããã ãã§ãå ã ã®BASICã½ã¼ã¹ãåç §ããªãã大åã®ã³ã¼ããæ¸ãæããçµæã¨ãªãã¾ãããã¾ããããããä½æ¥ãå«ããããªããè¥ããããæãåºããªããå°éã«ããã°ã©ã ãä½ãè¾¼ãã§è¡ãã¾ãããã»ãã¨ã20æ³åå¾ã®ããã¯å¯ããã¨ãæããã§ãã½ã³ã³ã®åã§ããããã¨ã³ã¼ãï¼è¨èªã¯BASICï¼ãæã¡è¾¼ãã§ããã®ã§ãã
ä½ã£ãããã°ã©ã ã¯å°ééèªã«ä½åº¦ãæ稿ãæ²è¼ããããèªå·±æºè¶³ãã¦ããèªåããã¾ãããï¼ãã®ãããã®è©±ã¯é·ããªãã®ã§ããã§ã¯å²æï¼
å®ãè¨ãã¨Javaè¨èªã¯3å¹´åã«å¿ è¦ã«ãããã¦å§ããã°ããã§ãå½åã¯ãæè¿ã®è¨èªã¯ããã©ããããªããªã©ã¨æããªãã触ã£ã¦ããã®ã§ãããæ £ãã¦ããã¨éçºç°å¢ï¼Eclipseï¼ã«é¦´æãã§ããããããã£ã¦ãå¾ã ã«è¦çãå¿«æã«å¤åãã¦ãã£ãã®ã§ãã
ç¹ã«ã²ã¼ã ã½ãããä½ãããã§ããæä¸ã¯å¤¢ä¸ã«ãªã£ã¦ãè¥ãããã¨åãããã«æéãå¿ãã¦è§¦ã£ã¦ããèªåããããããã¾ããã¾ããéæ¦ãéããèªåãæ°ããªè¨èªã«ãããã¨ã¯æã£ã¦ãã¿ã¾ããã§ããã
Â
ã¨ãããã¨ã§ãå®æããJavaè¨èªã«ã«ãããã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã ãã¯ä¸è¨ã®ããã«ãªãã¾ãããããã§å ¬éãã¦ãæå³ã¯ãªãã§ããããã©ï¼æ¬æ¥ã¯GitHubãªã©ã§å ¬éãã¹ãï¼ï¼ãã¨ããããã®ã¡ã¢ä»£ããã«è²¼ãä»ãã¦ããã¾ããï¼åæ°ã¯è¶³ããããªï¼ï¼
Â
ï¼Part6ã¸ã¤ã¥ãï¼
Â
/*
 * ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã
 *     original copyright 1978 by N.Tsuda
 *     convert & arrange to Java version by T.Sunahachi 2023
 */import java.util.InputMismatchException;
import java.util.Random;
import java.util.Scanner;public class TofuGame {
  static int STARTGOLD = 5000;   // éå§æã®ææé
  static int GOALGOLD = 30000;   // ç®æ¨éé¡
  static int TOFUBAIKA = 50;   // ãã¼ãã®å£²ä¾¡
  static int TOFUGENKA = 40;   // ãã¼ãã®å価
  static int SELLMAX = {500, 200, 100};   // 天æ°ãã¨ã®æ大売ä¸åæ°
  static String TENKIWORDS = {"æ´ã", "æã", "é¨"};   // 天æ°ã表ãè¨è
  Â
  static int hare;         // æ´ãã®ç¢ºç
  static int kumori;       // æãã®ç¢ºç
  static int ame;         // é¨ã®ç¢ºç  private static Random random = new Random();
  // ã¡ã¤ã³ã¡ã½ãã
  public static void main(String[] args) {    Scanner scanner = new Scanner(System.in);
    String input;    // éå§æã®å¦ç
    System.out.println("ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã (Javaç)");
    System.out.print("ã«ã¼ã«èª¬æãã¾ããï¼[y/n]:");
    input = scanner.nextLine();
    if (input.equalsIgnoreCase("y")) {
      displayRules();
    }
    Â
    do {
      // ã²ã¼ã ã®ã¡ã¤ã³å¦ç
      System.out.println("ï¼ï¼ï¼ï¼ï¼ ã²ã¼ã ã¹ã¿ã¼ã ï¼ï¼ï¼ï¼ï¼");      Â
      gameMain();
      // ç¶ç¶ç¢ºèªå¦ç
      System.out.println();
      System.out.print("ãã¬ã¤ãç¶ãã¾ããï¼[y/n]:");
      input = scanner.nextLine();
      System.out.println();
      if (input.equalsIgnoreCase("n")) {
        System.out.print("ãã¤ãããã¾ã§ããã");
        break;
      }
    } while (true);
  }  // 説ææã®è¡¨ç¤ºå¦ç
  private static void displayRules() {
    System.out.println();
    System.out.println("ããã¯ã¤ã¹ã«ã³ãã«æãããªãã¯ããã§ãã¼ãå±ãçµå¶ãã");
    System.out.println("å°çã¸ã®å¸°éè²»ç¨ãä½ãåºããªãã¦ã¯ããã¾ããã");
    System.out.println("ã§ããåããã«ã¯ãã³ã³ãã¥ã¼ã¿ãçµå¶ãããã¼ãå±ãããã¾ãããã");
    System.out.println();
    System.out.println("ãã¼ãã®å価ã¯ï¼å" + TOFUGENKA + "åãè²©å£²ä¾¡æ ¼ã¯" + TOFUBAIKA + "åã§ãã");
    System.out.println("ï¼æ¥ã«å£²ããåæ°ã¯å¤©åã«å·¦å³ããã¾ãã");
    System.out.println("æ´ããã¨" + SELLMAX[0] + "åãæãã ã¨" + SELLMAX[1] + "åãé¨ã®ã¨ãã¯" + SELLMAX[2] + "åã¾ã§å£²ãã¾ãã");
    System.out.println("ãã¼ãã¯æ¥æã¡ããªãã®ã§ã売ãæ®ã£ãåã¯ãã¹ã¦å»æ£ãã¾ãã");
    System.out.println("ææé" + STARTGOLD + "åããå§ãã¦ãæ©ã" + GOALGOLD + "åãè¶ ããæ¹ãåã¡ã§ãã");
    System.out.println();
  }  // ãã¼ãå±ã²ã¼ã ã®ã¡ã¤ã³å¦ç
  private static void gameMain() {    int playerMake;         // ãã¬ã¤ã¤ã¼ã®ä½æåæ°
    int computerMake;         // ã³ã³ãã¥ã¼ã¿ã®ä½æåæ°
    int playerSold;         // ãã¬ã¤ã¤ã¼ã®å£²ä¸åæ°
    int computerSold;         // ã³ã³ãã¥ã¼ã¿ã®å£²ä¸åæ°
    int playerProfit;         // ãã¬ã¤ã¤ã¼ã®å©ç
    int computerProfit;       // ã³ã³ãã¥ã¼ã¿ã®å©ç
    Â
    int playerGold = STARTGOLD;   // ãã¬ã¤ã¤ã¼ã®ææé
    int computerGold = STARTGOLD;   // ã³ã³ãã¥ã¼ã¿ã®ææé    do {
      // ææéã®è¡¨ç¤ºå¦ç
      System.out.println();
      System.out.println("ããªãã®ææé㯠" + playerGold + "å ã§ãã");
      System.out.println("ãããã®ææé㯠" + computerGold + "å ã§ãã");
      System.out.println();      // åè² ã®å¤å®å¦ç
      if (playerGold >= GOALGOLD || computerGold >= GOALGOLD) {
        if (playerGold >= computerGold) {
          System.out.println("ï¼ï¼ï¼ï¼ï¼ ããªãã®åã¡ã§ãï¼ ï¼ï¼ï¼ï¼ï¼");
        } else {
          System.out.println("ï¼ï¼ï¼ï¼ï¼ ã³ã³ãã¥ã¼ã¿ã®åã¡ã§ã ï¼ï¼ï¼ï¼ï¼");
        }
        return;
      }      // 天æ°äºå ±ã®è¡¨ç¤ºå¦ç
      tenkiYohou();      // ãã¼ãã®ä½æå¦çÂ
      playerMake = inpTofu(playerGold / TOFUGENKA);
      computerMake = compTofu(computerGold / TOFUGENKA, playerMake);      // ç¿æ¥ã®å¤©æ°ã®æ±ºå®ã»è¡¨ç¤ºå¦ç
      int tenki = nextTenki();      // çµæ表示å¦ç
      playerSold = soldTofu(tenki, playerMake);
      computerSold = soldTofu(tenki, computerMake);
      System.out.println("ããªã㯠" + playerMake + "å ä½ãã" + playerSold + "å 売ãã¾ããã");
      System.out.println("ããã㯠" + computerMake + "å ä½ãã" + computerSold + "å 売ãã¾ããã");
      playerProfit = playerSold * TOFUBAIKA - playerMake * TOFUGENKA;
      computerProfit = computerSold * TOFUBAIKA - computerMake * TOFUGENKA;
      System.out.println();
      System.out.println("ããªãã®å©ç㯠" + playerProfit + "å ã§ãã");
      System.out.println("ãããã®å©ç㯠" + computerProfit + "å ã§ãã");      // ææéã®è¨ç®
      playerGold += playerProfit;
      computerGold += computerProfit;    } while (true);
  }  // 天æ°äºå ±ã®è¡¨ç¤º
  private static void tenkiYohou() {    System.out.println("ï¼ï¼ï¼ï¼ï¼ 天æ°äºå ± ï¼ï¼ï¼ï¼ï¼");
    hare = randomNum(100);
    kumori = randomNum(100 - hare);
    ame = 100 - hare - kumori;    System.out.println("æ´ã®ç¢ºç㯠" + hare + " ï¼ ã§ãã");
    System.out.println("æã®ç¢ºç㯠" + kumori + " ï¼ ã§ãã");
    System.out.println("é¨ã®ç¢ºç㯠" + ame + " ï¼ ã§ãã");
  }  // 0ï½æå®æ°ã¾ã§ã®ä¹±æ°ãçºçããã
  private static int randomNum(int max) {
    if (max == 0) return 0;
    return random.nextInt(max);
  }  // ãã¼ãã®ä½ææ°ã®å ¥åå¦ç
  private static int inpTofu(int limit) {    System.out.println();
    System.out.println("ç¾å¨ãããªããä½ããã¨ã®ã§ãããã¼ãã¯" + limit + "åã¾ã§ã§ãã");
    Scanner scanner = new Scanner(System.in);
    int num = 0;
    Â
    do {
      System.out.print("ä½ãåæ°ãå ¥åãã¦ãã ããï¼");
      try {
        num = scanner.nextInt();
      } catch(InputMismatchException e) {Â
        System.out.println("æ°åãæ£ããå ¥åãã¦ãã ããã");
        scanner.nextLine();    Â
        // â dummy method! (https://qiita.com/Choco_Late/items/5b6a9fdc98b53194a643)
        continue;
      }
      if (num >= 1 && num <= limit) {
        break;
      } else {
        System.out.println("ä½ããã¨ã®ã§ããç¯å²å¤ã®åæ°ã§ããåå ¥åãã¦ãã ããã");
      }
    } while (true);    return num;
  }  // ã³ã³ãã¥ã¼ã¿ã®ä½æåæ°
  private static int compTofu(int limit, int player) {    int num;
    String watashi;
    if (ame >= 40) {
      num = SELLMAX[2];     // é¨ãæ³å®
    } else if (kumori < 40 - ame) {
      num = SELLMAX[0];     // æ´ããæ³å®
    } else {
      num = SELLMAX[1];     // æããæ³å®        Â
    }
    if (num > limit) {
      num = limit;
    }
    if (num == player) {
      watashi = "ã";
    } else {
      watashi = "ã¯";
    }
    System.out.println("ããã" + watashi + " " + num + "å ãã¼ããä½ãã¾ããã");
    return num;
  }  // 天æ°ã®æ±ºå®ï¼è¡¨ç¤ºå¦ç
  private static int nextTenki() {    int tenkiVal;
    // 1ï½100ã®ãµã¤ã³ããæ¯ã
    int dice = random.nextInt(100) + 1;
    if (dice <= hare) {
      tenkiVal = 0;
    } else if (dice <= hare + kumori) {
      tenkiVal = 1;
    } else {
      tenkiVal = 2;
    }    System.out.println();
    System.out.println("ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼ 次ã®æ¥ ã¼ã¼ã¼ã¼ã¼ã¼ã¼ã¼");    // ã¦ã§ã¤ãå¦ç
    try {
      for (int i = 0; i < 3; i++) {
        System.out.print("ã»");
        Thread.sleep(1000);
      }
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    System.out.println();    System.out.println("天å㯠" + TENKIWORDS[tenkiVal] + " ã§ãã");
    return tenkiVal;  }
  // 売ä¸åæ°ã®è¨ç®
  private static int soldTofu(int tenki, int make) {    int sold = make;
    if (make > SELLMAX[tenki]) {
      sold = SELLMAX[tenki];
    }
    return sold;  }
}
Â
ãã£ã±ã趣å³ã®ããã°ã©ãã³ã°ã¯æ¥½ããï¼Part4ï¼
ï¼Part3ããï¼
Â
ãã¯ãã¨ããããChatGPTã¯ä¸è½ã§ã¯ãªãã¨ãããã¨ã§ï¼ãã¨ãã¨æç« ãçæããæ©è½ã«ç¹åãããã®ã ãï¼è«¦ããã°ããã®ã«ããã¤ããå度ãã©ã¤ãããã¨ã«ãã¾ããã
ãRubyã§ã ããªãPrologããããã
ã¨ãããã¨ã§ãä»åº¦ã¯ãããªæãã§ãChatGPTã«ãé¡ããã¾ããã
Â
以ä¸ã®Prologã®ããã°ã©ã ãJavaè¨èªã«æ¸ãæãã¦ãã ããã
%;;;; -*- Â coding: utf-8 -*-
%
% tofu.prolog  -  ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã ï¼Prologçï¼
% Â by ãããã (take at takeoka.net)
% Â ver.1.0
% Â 2012/DEC/09
% Â for SB-Prolog or GNU Prolog
%
% Copyright (C) 1978 - 2000 by Nobuhide Tsuda
% http://vivi.dyndns.org/tofu/tofu.html
% èä½æ¨©ã¯æ´¥ç°ä¼¸ç§ãã ([email protected]) ã«ããã¾ãã
%
% ãã® Prologçã¯ããããã ããããããã
% æ°¸éåä¸éæ°ã®([email protected]) perlç tofu.plãå ã«
% æ¸ãç´ãããã®ã§ãã
%
%
% consult('/home/take/src/tofuya/tofu-prolog/tofu.prolog').
% ?- tofu.% millisleep
%#+sbcl (defun millisleep(x) (sleep (/ x 1000)))
millisleep(X) :- XX is X/1000.0, sleep(XX).
% ä¹±æ°åæå
:- dynamic(irandom/2).
defRand :- retractall(irandom(_,_)),defRand1.
defRand :- defRand1.defRand1 :-
  current_prolog_flag(prolog_name,'GNU Prolog'),
  %%for GnuProlog
  !,asserta((irandom(R,N) :- !,random(RR),R is floor(RR * N + 0.0))).
defRand1 :-
  %%for SWIProlog
  !,asserta((irandom(R,N) :- (!,R is random(N)))).% 0 - 100ã®æ´æ°ä¹±æ°
random100(R) :- irandom(R, 101).ï¼ä»¥ä¸ç¥ï¼
Â
以ä¸ã¯Javaè¨èªã«æ¸ãæããããã°ã©ã ã§ãã
import java.util.Random;
import java.util.Scanner;public class TofuGame {
  private static Random random = new Random();  private static void millisleep(long milliseconds) {
    try {
      Thread.sleep(milliseconds);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }  private static int random100() {
    return random.nextInt(101);
  }  private static int calc(int comp, int hare, int ame) {
    int x;
    if (hare >= 50) {
      x = 500;
    } else if (ame > 30) {
      x = 100;
    } else {
      x = 300;
    }
    return Math.min(comp / 40, x);
  }  private static void disp(String str) {
    System.out.print(str);
  }  private static void displn(String str) {
    System.out.println(str);
  }  private static void dispShojikin(String name, int gold) {
    int ggg = gold / 1000;
    System.out.print("  " + name + " " + gold + " å  ");
    for (int i = 0; i < ggg; i++) {
      System.out.print("â ");
    }
    for (int i = 0; i < Math.max(30 - ggg, 0); i++) {
      System.out.print("â¡");
    }
    System.out.println();
  }  private static void dispYohou(int hare, int kumori, int ame) {
    int hhh = hare * 10 / 25;
    int kkk = kumori * 10 / 25;
    int aaa = 1000 / 25 - (hhh + kkk);
    System.out.println();
    System.out.println("ææ¥ã®å¤©æ°äºå ±ï¼ æ´ã " + hare + "%  ããã " + kumori + "% Â é¨ " + ame + "%");
    for (int i = 0; i < hhh; i++) {
      System.out.print("â");
    }
    for (int i = 0; i < kkk; i++) {
      System.out.print("ã»");
    }
    for (int i = 0; i < aaa; i++) {
      System.out.print("â");
    }
    System.out.println();
  }  private static int inpTofu(int limit) {
    Scanner scanner = new Scanner(System.in);
    while (true) {
      System.out.print("ãã¼ããä½åä½ãã¾ããï¼ï¼ï¼ã" + limit + "ï¼> ");
      int x = scanner.nextInt();
      if (x > 0 && x <= limit) {
        return x;
      }
    }
  }  private static int profit(int n, int sold) {
    return Math.min(sold, n) * 50 - (n * 40);
  }  private static void dispResult(int player, int comp) {
    if (player > comp) {
      System.out.println("ããªãã®åã¡ã§ãã");
    } else if (player < comp) {
      System.out.println("ã³ã³ãã¥ã¼ã¿ã®åã¡ã§ãã");
    } else {
      System.out.println("å¼ãåãã§ãã");
    }
  }  private static void tofu() {
    defRand();
    displn("ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã (Javaç)");Â
ï¼ä¸ç¥ï¼
Â
ãã®ããã«ä¿®æ£ãããã¨ã§ããã¬ã¤ã¤ã¼ã¨ã³ã³ãã¥ã¼ã¿ã®ãã¼ãã®ä½æã天åã®è¨å®ãå©çã®è¨ç®ãªã©ãè¡ããã¾ããã²ã¼ã ã¯ææéã30,000å以ä¸ã«ãªããã©ã¡ããã®åå©æ¡ä»¶ãæºããããã¾ã§ç¶ãã¾ãã
(ChatGPT)
Â
ã¨ããã¾ãè¡ãããã«æããã®ã§ãããå¿ è¦ã¨ãªãã¡ã½ãããä½æ ãæãã¦ããã®ã§ãã
Â
calc ã¡ã½ããã表示ãã¦
ç³ã訳ããã¾ããããæä¾ãããã³ã¼ãã«ã¯
calc
ã¡ã½ãããå«ã¾ãã¦ãã¾ããããããããå¥ã®ã³ã¼ããã¡ã½ãããåç §ãã¦ããå¯è½æ§ãããã¾ãããããã¯ãcalc
ã¡ã½ããã«ã¤ãã¦è©³ç´°ãªèª¬æãæãã¦ããã ããã°ããã®å 容ã«åºã¥ãã¦ãæä¼ãã§ããããããã¾ããããæä¾ããã ããæ å ±ãä¸ååãªå ´åã¯ã追å ã®è©³ç´°ãæãã¦ããã ãã¾ããï¼ï¼ChatGPT)
Â
ãããããå ã®ã½ã¼ã¹ã³ã¼ãã«calcã¡ã½ããã«ç¸å½ããé¨åã¯å«ã¾ãã¦ãã¾ãããã©ããã§æãè½ã¡ãã®ã ããã¨ãããã¨ã§ãä»åº¦ã¯ChatGPTãçæããJavaè¨èªã®ã½ã¼ã¹ãè²¼ãä»ãã¦ã¿ãã®ã§ãã
Â
ãã®Javaã®ã³ã¼ããæ£ããä¿®æ£ãã¦ãã ããã
import java.util.Random;
import java.util.Scanner;public class TofuGame {
  private static Random random = new Random();  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    System.out.println("ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã (Javaç)");
    System.out.println("ã«ã¼ã«èª¬æãã¾ããï¼[y/n]");
    String input = scanner.nextLine();
    if (input.equalsIgnoreCase("y")) {
      displayRules();
    }
    tofu();
    System.out.println("ãã¬ã¤ãç¶ãã¾ããï¼[y/n]");
    input = scanner.nextLine();
    if (input.equalsIgnoreCase("y")) {
      main(args);
    }
  }ï¼ä»¥ä¸ç¥ï¼
Â
ä¿®æ£ãããã³ã¼ãã¯ä»¥ä¸ã®éãã§ãã
ï¼ã³ã¼ãã¯ç¥ï¼
ããã§ä¿®æ£ãå®äºãã¾ãããä¿®æ£ããã³ã¼ãã試ãã¦ã¿ã¦ãã ãããä¿®æ£å 容ã¯ãä¸è¦ãª
main
ã¡ã½ãããåé¤ããcalc
ã¡ã½ããã追å ãã¦ããç¹ã§ããã¾ããé¢æ°åã®æ¥æ¬èªè¡¨è¨ãè±èªè¡¨è¨ã«ä¿®æ£ãã¦ãã¾ãããä¸æãªç¹ãããã°ãé æ ®ãªããç¥ãããã ããã
ï¼ChatGPT)
Â
ãªãã¨ãªããã¾ãè¡ã£ããããªæ«å°¾ã®æç« ã§ããããçµå±ã¯æªå®æã®ããã°ã©ã ã§ãããªãã£ãã®ã§ããå½ç¶ã§ããããããã¨ãã¨ä»æ§ãä¸æã ã¨è¨ã£ã¦æãè½ã¡ã¦ããcalcã¡ã½ãããä½ã®æ å ±ãä¸ããªãç¶æ³ã§âåæã«çæâããã®ã§ãããã
Â
ï¼Part5ã¸ã¤ã¥ãï¼
ãã£ã±ã趣å³ã®ããã°ã©ãã³ã°ã¯æ¥½ããï¼Part3ï¼
ï¼Part2ããï¼
Â
ã¨ããããçµè«ãå
ã«æ¸ãã°ããã£ã±ãã¨ãããä»åã¯ãªããªããã¾ããããªãã£ãã®ã§ããã¾ãã¯ããããªè³ªåããã¦ã¿ã¾ããã
ãã¤ã¹ã«ã³ãã«ã®ã¨ããµå±ã²ã¼ã ããç¥ã£ã¦ãã¾ããï¼
ç³ã訳ããã¾ãããããã¤ã¹ã«ã³ãã«ã®ã¨ããµå±ã²ã¼ã ãã«ã¤ãã¦ã¯ãç§ã®ç¥èã«ã¯å«ã¾ãã¦ãã¾ãããå¯è½æ§ã®ããçç±ã¨ãã¦ããã®ã²ã¼ã ãé常ã«æ°ããããã¾ãã¯å°åçãªäººæ°ãããã²ã¼ã ã§ããå¯è½æ§ãããã¾ãã詳細ã«ã¤ãã¦æãã¦ããã ããã°ããæä¼ãã§ããããããã¾ããããä¿è¨¼ãããã¨ã¯ã§ãã¾ãããä»ã®è³ªåããæä¼ãã§ãããã¨ãããã°ãã©ãããç¥ãããã ããã
ï¼ChatGPTï¼
Â
ã¾ããç¥ã£ã¦ããã»ããããããã¨ã¯æãã¾ããããæ¥æ¬äººã®99.9999ï¼
ã®äººã¯ç¥ããªãã¨æããï¼æ°åã¯é©å½ï¼ãã¨ãããã¨ã§ãæ¬é¡ã®ã»ãã«ã¯ãã£ãããã§ããã
以ä¸ã®Rubyã§æ¸ãããããã°ã©ã ãJavaè¨èªã«å¤æãã¦ãã ããã
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
##â ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã â (å¤é¨ä»æ§ããåç¾)
##Copyright (C) 1978-2013 by N.Tsuda
##Reference: http://vivi.dyndns.org/tofu/tofu.html
##èæ¯: ããªãã¯ã¤ã¹ã«ã³ãã«æã§éé£ãã帰ãã®è²»ç¨ã稼ãããã«ãã¼ãããªãã¹ããããã売ã£ã¦ãéã稼ããªããã°ãªããªãã
##æåã«ææé1000åãä¸ããããã
##30000åå²ãããã¨ãã§ããã°ããã§ããã¤ã¹ã«ã³ãã«ããè±åºãããã¨ãã§ããã
##ãã¼ãã¯è£½é ã«ä¸åããã10åããããä¸åããã12åã§å£²ããã¨ãã§ããã
##ãã¼ãã¯æ´ãã®æ¥ã¯100åãæãã®æ¥ã¯50åãé¨ã®æ¥ã¯10å売ããã
##売ããªãã£ãåã¯æ失ã¨ãªãã
##ããªãã¯å¤©æ°äºå ±ãè¦ã¦ãææ¥ããã¤ã®ãã¼ãã製é ãããã決ããã°ãªããªãã
##
##A Tofu vendor surviving in Iscandar
##Copyright (C) 1978-2013 by N.Tsuda
##Reference: http://vivi.dyndns.org/tofu/tofu.html
##Background: You are a castaway in planet Iscandar in outer space, and you have to gain money by making and selling Tofu in order to go back to your mother planet.
##Initially you have 1,000 yen. The goal is to gain 30,000 yen for your traveling fee.
##One Tofu costs 10 yen for production, and the unit price is 12 yen.
##The sales of Tofu depends on weather: you can sell 100 Tofu on a fine day, 50 on a cloudy day, and 10 on a rainy day.
##Watch weather forecast and determine the quantity of Tofu you are going to make.class Iscandar
 COST   = 10
 PRICE  = 12
 RATE   = {
  fine:  100,
  cloudy:  50,
  rainy:  10
 }
 RED = "\e[31m"
 GRN = "\e[32m"
 SO  = "\e[m"ï¼ä»¥ä¸ç¥ï¼
Â
以ä¸ã¯ãæä¾ãããRubyããã°ã©ã ãJavaè¨èªã«å¤æãããã®ã§ãããã ããJavaã®åºåã¯ã¿ã¼ããã«ã§ã¯ãªãã³ã³ã½ã¼ã«ä¸ã«è¡¨ç¤ºããããããä¸é¨ã®åºåé¨åã«ã¯èª¿æ´ãå¿ è¦ã§ãã
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.Scanner;public class Iscandar {
  private static final int COST = 10;
  private static final int PRICE = 12;
  private static final Map<String, Integer> RATE = new HashMap<String, Integer>() {{
    put("fine", 100);
    put("cloudy", 50);
    put("rainy", 10);
  }};
  private static final String RED = "\u001B[31m";
  private static final String GRN = "\u001B[32m";
  private static final String SO = "\u001B[m";  private Map<String, Integer> forecast;
  private int total;  public Iscandar() {
    forecast = new HashMap<>();
    total = 1000;    showComment();
  }  private void showComment() {
    String filename = Iscandar.class.getSimpleName() + ".java";
    // ã³ã¡ã³ãè¡ã®ã¿ãæ½åºãã¦è¡¨ç¤ºãããã¨ã§å¯¾å¿ãã¾ã
    // å¿ è¦ã«å¿ãã¦ãã¡ã¤ã«ã®èªã¿è¾¼ã¿ãè¡ã£ã¦ãã ãã
    System.out.println("##ã¤ã¹ã«ã³ãã«ã®ãã¼ãå±ã²ã¼ã ## (å¤é¨ä»æ§ããåç¾)");
    System.out.println("##Reference: http://vivi.dyndns.org/tofu/tofu.html");
    System.out.println("##èæ¯: ããªãã¯ã¤ã¹ã«ã³ãã«æã§éé£ãã帰ãã®è²»ç¨ã稼ãããã«ãã¼ãããªãã¹ããããã売ã£ã¦ãéã稼ããªããã°ãªããªãã");
    System.out.println("##æåã«ææé1000åãä¸ããããã");
    System.out.println("##30000åå²ãããã¨ãã§ããã°ããã§ããã¤ã¹ã«ã³ãã«ããè±åºãããã¨ãã§ããã");
    System.out.println("##ãã¼ãã¯è£½é ã«ä¸åããã10åããããä¸åããã12åã§å£²ããã¨ãã§ããã");
    System.out.println("##ãã¼ãã¯æ´ãã®æ¥ã¯100åãæãã®æ¥ã¯50åãé¨ã®æ¥ã¯10å売ããã");
    System.out.println("##売ããªãã£ãåã¯æ失ã¨ãªãã");
    System.out.println("##ããªãã¯å¤©æ°äºå ±ãè¦ã¦ãææ¥ããã¤ã®ãã¼ãã製é ãããã決ããã°ãªããªãã");
    System.out.println();
  }  private Map<String, Integer> calcProbab() {
    Map<String, Integer> probab = new HashMap<>();
    Random random = new Random();
    probab.put("fine", random.nextInt(100));
    probab.put("cloudy", random.nextInt(100 - probab.get("fine")));
    probab.put("rainy", 100ï¼ChatGPTï¼
Â
ä¾ã«ãã£ã¦éä¸ã§åãã¦ãã¾ããããã§ããã¤ãã®ããã«ç¶ãã表示ããã¦ããã¹ã¦è¡¨ç¤ºãããã¨æãããã½ã¼ã¹ã³ã¼ããEclipseã«è²¼ãä»ãã¾ãããã¨ã©ã¼ã¯åºãªãã£ããã®ã®å®è¡ãããã¨ãæã£ããããªåãã«ã¯ãªããã²ã¼ã ã«ã¼ã«çã«æ» è¶è¦è¶ãªåä½ãããã®ã§ãã
Â
ï¼Part4ã«ã¤ã¥ãï¼