開発環境
- OS X Mavericks - Apple(OS)
- Safari, Firefox + Firebug, Google Chrome(Webプラウザ、プラグイン)
- BBEdit - Bare Bones Software, Inc. (GUI) , Emacs (CUI) (Text Editor)
- JavaScript (プログラミング言語)
Head First JavaScript Programming (Eric T. Freeman (著)、 Elisabeth Robson (著)、 O'Reilly Media )のChapter 8(Bringing it All Together: Building an app)、CODE MAGNETS(p.363)を解いてみる。
CODE MAGNETS(p.363)
- Loop for the number of ships we want create.
- Generate a random direction(vertical or horizontal) for the new ship.
- Generate a random location for the new ship.
- Test to see if the new ship's locations collide with any existing ship's locations.
- Add the new ship's locations to the ships array.
0 コメント:
コメントを投稿