Programming 板


LINE

大家久等了,以下是ptt知名討論串用Shakespeare Programming 實作。 邏輯跟我上一篇Smalltalk 實作一樣,是對數字的商和餘數進行判斷。 https://goo.gl/RYM2bD Shakespeare 原作者的c無法正確執行,因此我在github找到了另一個compiler https://github.com/drsam94/Spl 可惜這個compiler說無法支援stack (實際上支援,我也不知道為什麼他說不行) 為了保險起見,我並沒有使用stack,是直接建立10個變數來判斷。 有興趣看詳解我在貼,廢話不多說了: The following play performs on Ubuntu 14, and you shall use the compiler from "https://github.com/drsam94/Spl" This play will determine if a number is unique based on the absence of any repetitive digit. Some instances of serious violation to the definition of an unique number would be: 121, 988, 677. Romeo, the son of Montague who secretly loves and marries Juliet. Juliet, the daughter of Capulet who secretly loves and marries Romeo. Lady Capulet, wife of Capulet, Juliet's mother. Montague, the patriarch of the house of Montague, Romeo's father. Tybalt, a cousin of Juliet and rival of Romeo. Benvolio, a cousin of Romeo and best friend. The Ghost, who loves to insult. King Henry, a king. King John, a king. King Lear, a king. King Richard, a king. Lady Macbeth, a lady. Lady Macduff, a lady. The Duke of Milan, a duke. The Duke of Venice, a duke. Act I: Love at the first slight. Scene I: A lovely introduction of Romeo and Juliet. [Enter Romeo and Juliet] Romeo: You pretty sweet young woman! Thou art as lovely as the difference between the square of thyself and your smooth hair. Speak your mind. Juliet: Listen to your heart! You art the sum of yourself and hero. [Exit Romeo] Scene II: Lady Capulet charms Montague. [Enter Montague] Juliet: You cursed dirty evil lying distasteful damned father! You art as miserable as the sum of thyself and a infected smelly fat stupid animal! [Exit Juliet] [Enter Lady Capulet] Lady Capulet: Speak your mind. Montague: You art as foul as the sum of skilless unpracticed rural limiting bottomless villainous mother and cow. You art as weak as the sum of tiny normal horrid cowardly bad father and thyself. Speak your mind. Lady Capulet: Thou art as noble as me. You art the sum of good handsome mighty peaceful man and thyself. You art the sum of thyself and father. Speak your mind. Montague: You art as good as me. You art the sum of joy and thyself. Speak your mind. Lady Capulet: Thou art as trustworthy as me. You art the difference between thyself and cowardly rotten misused stinking man. You art the sum of thyself and brave lord. Speak your mind. Montague: Thou art charming fair gentle warm fine lady. Speak your mind. Lady Capulet: Thou art as noble as a king. Open your heart! Montague: Speak your mind! You art as lovely as the sum of a sweet heaven and a peaceful happy warm angel. [Exeunt] Act II: Capulet's support to Romeo. Scene I: Mother always loves her beautiful daughter. [Enter Juliet and Lady Capulet] Lady Capulet: You art always my girl. [Exeunt] Scene II: Romeo's self assert. [Enter Lady Capulet and Romeo] Lady Capulet: You art the difference between yourself and the father. Romeo: Am I better than nothing? Lady Capulet: If not, we shall proceed to Let Juliet give Romeo confidence. [Exit Romeo] [Enter Juliet] Lady Capulet: You art the product of thyself and me. We shall return to Romeo's self assert. [Exeunt] Scene III: Let Juliet give Romeo confidence. [Exeunt] [Enter Juliet and Romeo] Romeo: Open your heart! Juliet: You art the sum a brave handsome honest hero and good man. Speak your mind. [Exeunt] Act III: Short-tempered Cousin. Scene I: Introduce Tybalt, Juliet's cousin. [Enter Tybalt and Juliet] Juliet: You art my cousin. Open your heart. [Exit Tybalt] [Enter Romeo] Juliet: Speak your mind. [Exit Romeo] Scene II: Tybalt's self assert. [Exeunt] [Enter Juliet and Tybalt] Juliet: You art the sum of yourself and a cousin. Tybalt: Am I as miserable as you? If so, we must proceed to Act IV. Scene III: The insults of the nobles. [Exeunt] [Enter The Ghost] [Enter King Henry] The Ghost: You art nothing! [Exit King Henry] [Enter King John] The Ghost: You art nothing! [Exit King John] [Enter King Lear] The Ghost: You art nothing! [Exit King Lear] [Enter King Richard] The Ghost: You art nothing! [Exit King Richard] [Enter Lady Capulet] The Ghost: You art nothing! [Exit Lady Capulet] [Enter Lady Macbeth] The Ghost: You art nothing! [Exit Lady Macbeth] [Enter Lady Macduff] The Ghost: You art nothing! [Exit Lady Macduff] [Enter Montague] The Ghost: You art nothing! [Exit Montague] [Enter The Duke of Milan] The Ghost: You art nothing! [Exit The Duke of Milan] [Enter The Duke of Venice] The Ghost: You art nothing! [Exit The Duke of Venice] [Exit The Ghost] Scene IV: Tybalt's assert of Benvolio. [Enter Tybalt and Benvolio] Tybalt: You art as miserable as me! Scene V: The Ghost answer of Benvolio. [Exeunt] [Enter The Ghost and Benvolio] Benvolio: Am I better than nothing? The Ghost: If not, let us proceed to Let Ghost talk to the rivals. Benvolio: You art as good as remainder of the quotient between me and the sum of an amazing furry mighty animal and a cute chihuahua! The Ghost: You art the quotient between yourself and the sum of an smelly fat weak animal and a stupid chihuahua. The Ghost: Am I as normal as a man? If so, we shall proceed to Scene VI. Am I as normal as honest man? If so, we shall proceed to Scene VII. Am I as normal as the difference between honest noble king and man? If so, we shall proceed to Scene VIII. Am I as normal as honest noble man? If so, we shall proceed to Scene IX. Am I as normal as sum of honest noble king and man? If so, we shall proceed to Scene X. Am I as normal as sum of honest noble king and stupid man? If so, we shall proceed to Scene XI. Am I as normal as difference between honest noble peaceful king and man? If so, we shall proceed to Scene XII. Am I as normal as honest noble peaceful king? If so, we shall proceed to Scene XIII. Am I as normal as sum of honest noble peaceful king and man? If so, we shall proceed to Scene XIV. Am I as normal as sum of honest noble peaceful king and rich man? If so, we shall proceed to Scene XV. We must proceed to The Ghost answer of Benvolio. Scene VI: Ghost insults King Henry. [Exeunt] [Enter The Ghost and King Henry] King Henry: Am I better than nothing? The Ghost: You art stupid man! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene VII: Ghost insults King John. [Exeunt] [Enter The Ghost and King John] King John: Am I better than nothing? The Ghost: You art stupid man! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene VIII: Ghost insults King Lear. [Exeunt] [Enter The Ghost and King Lear] King Lear: Am I better than nothing? The Ghost: You art stupid man! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene IX: Ghost insults King Richard. [Exeunt] [Enter The Ghost and King Richard] King Richard: Am I better than nothing? The Ghost: You art stupid man! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene X: Ghost insults Lady Capulet. [Exeunt] [Enter The Ghost and Lady Capulet] Lady Capulet: Am I better than nothing? The Ghost: You art stupid man! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene XI: Ghost insults Lady Macbeth. [Exeunt] [Enter The Ghost and Lady Macbeth] Lady Macbeth: Am I better than nothing? The Ghost: You art stupid woman! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene XII: Ghost insults Lady Macduff. [Exeunt] [Enter The Ghost and Lady Macduff] Lady Macduff: Am I better than nothing? The Ghost: You art stupid woman! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene XIII: Ghost insults Lady Montague. [Exeunt] [Enter The Ghost and Lady Montague] Montague: Am I better than nothing? The Ghost: You art stupid woman! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene XIV: Ghost insults Duke Milan. [Exeunt] [Enter The Ghost and The Duke of Milan] The Duke of Milan: Am I better than nothing? The Ghost: You art stupid man! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene XV: Ghost insults Duke Venice. [Exeunt] [Enter The Ghost and The Duke of Venice] The Duke of Venice: Am I better than nothing? The Ghost: You art stupid man! If so, we must return to Scene II. we must return to The Ghost answer of Benvolio. Scene XVI: Let Ghost talk to the rivals. [Exeunt] [Enter The Ghost and Tybalt] The Ghost: Open your heart! [Exit Tybalt] [Enter Romeo] The Ghost: Speak your mind! Let us return to Scene II. Act IV: The Ending. Scene I: Exit of all actors and actresses. [Exeunt] 謝謝大家。 --



※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 73.71.217.229
※ 文章網址: https://webptt.com/m.aspx?n=bbs/Programming/M.1488616568.A.074.html ※ 編輯: NobleDino (107.77.211.26), 03/04/2017 17:48:11
1F:推 LPH66: 推 180.177.29.238 03/04 18:17
2F:推 Frozenmouse: Speak your mind! 59.115.165.216 03/04 20:13
3F:→ NobleDino: Open your heart! 73.71.217.229 03/05 04:56
4F:推 R0bin03: 推推 175.182.42.84 03/05 19:11
5F:→ MOONRAKER: 這個Ghost好囉唆 XD 60.248.110.133 03/06 10:45







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:iOS站內搜尋

TOP