Skip to content

Commit

Permalink
translated example.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
yasusii committed Oct 25, 2019
1 parent 1cc36d9 commit 28e518b
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 0 deletions.
Binary file added doc/_static/asteroids.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/flappybird.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/lander.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/memory.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/mines.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/pong.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/snake.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/tetra-puzzle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/tron.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
ゲームプログラムのサンプル
==========================

Pygame Zero にはゲームのコードを読んだり変更したりして学ぶためのサンプルのコレクションがあります。もちろんそのゲームで遊ぶこともできます! これらのサンプルは Pygame Zero の通常のインストールでは含まれていませんが、ソースコードリポジトリから入手できます。ダウンロード方法は以下の通りです。

- `GitHub リポジトリ <https://github.com/lordmauve/pgzero>`_ で緑の大きなボタンをクリックすると表示される **Download ZIP** を選択して Pygame Zero をダウンロードします。
- ダウンロードした zip ファイルを展開したら、その中の ``examples`` をフォルダごと好きな場所にコピーします。
- ディスクスペースを節約したければ、zip ファイルやそのほかのソースコードは削除してかまいません。

これであなたが作成したゲームと同じやり方でゲームを動かせるようになりました。たとえば、ピンポンゲームを起動するには次のように実行してください ::

pgzrun examples/pong/pong.py

ソースコードを読んだり、変更してみることはプログラミングのとても良い学習方法です。さあ、早速コードをハックしてみましょう!

ゲームサンプルの一覧
--------------------

Asteroids
^^^^^^^^^
.. image:: _static/asteroids.png
:alt: Asteroids
:height: 500
:align: center

実行方法 ::

pgzrun examples/asteroids/main.py

基本のプログラム
^^^^^^^^^^^^^^^^
以下のプログラムは Pygame Zero の主要機能を学ぶのに役立つ簡単なサンプルです。こららのいくつかはドキュウメントの中で説明されているものです。

Flappybird
^^^^^^^^^^
.. image:: _static/flappybird.png
:alt: Flappybird
:height: 500
:align: center

実行方法 ::

pgzrun examples/flappybird/flappybird.py

Lander
^^^^^^
.. image:: _static/lander.png
:alt: Lander
:height: 500
:align: center

実行方法 ::

pgzrun examples/lander/lander.py

Memory
^^^^^^
.. image:: _static/memory.png
:alt: Memory
:height: 500
:align: center

実行方法 ::

pgzrun examples/memory/memory.py

Mines
^^^^^
.. image:: _static/mines.png
:alt: Mines
:height: 300
:align: center

実行方法 ::

pgzrun examples/mines/mines.py

Pong
^^^^
.. image:: _static/pong.png
:alt: Pong
:height: 500
:align: center

実行方法 ::

pgzrun examples/pong/pong.py

Snake
^^^^^
.. image:: _static/snake.png
:alt: Snake
:height: 300
:align: center

実行方法 ::

pgzrun examples/snake/snake.py

Tetra puzzle
^^^^^^^^^^^^
.. image:: _static/tetra-puzzle.png
:alt: Tetra Puzzle
:height: 500
:align: center

実行方法 ::

pgzrun examples/tetra_puzzle/main.py

Tron
^^^^
.. image:: _static/tron.png
:alt: Tron
:height: 500
:align: center

実行方法 ::

pgzrun examples/tron/tron.py

0 comments on commit 28e518b

Please sign in to comment.