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/cn.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灯, 水草

请输入看板名称,例如:WOW站内搜寻

TOP