Score
0
Watch 25 Star 104 Fork 12

Gitee星球的小活动 / 第 0 届 代码编故事接力赛

Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
让我们点燃程序员写作之魂,一人用代码写一段故事玩玩吧~ spread retract

Clone or download
java-street.md 1.09 KB
Copy Edit Web IDE Raw Blame History
吉吉 authored 2020-03-24 16:08 . update java-street.md.
//编程语言:java
//故事主题:阿里巴巴的续集……

import java.util.ArrayList;
import story.*;

public class StoryTest {
   public static void main(String[] args) {
       Story story = new Story();
       Street street = new Street();
       story.setAddress(street);
       story.setTime("morning"); //清晨……
       scream(); //街上传来一身尖叫……
       List<Person> personList = new ArrayList();
       
       for(int i = 0; i <= 50; i ++)
               personList.add(new Person()); //睡眼惺忪的人群从楼道里出来……

       Ball ball = new ball();
       ball.setVolume.(80,"m^2");
       street.addObject(ball); //一个梆大的球横躺在街道中间……

       personList.get(0).say("I am a programmer, I will remove it!");
       personList.get(0).sudo("street.delObject(ball);"); //这位程序员移除了这个碍事的球
       
       for(int i = 1; i <= 50; i ++)
               personList.get(i).say("Thank you!"); //人们纷纷感谢这位程序员

   }
}

// go on
} 

Comment ( 0 )

Sign in for post a comment

1
https://gitee.com/Selected-Activities/Code-relay.git
git@gitee.com:Selected-Activities/Code-relay.git
Selected-Activities
Code-relay
第 0 届 代码编故事接力赛
master

Help Search

220309 7019f5b6 1899542 220318 4015cbb9 1899542