> For the complete documentation index, see [llms.txt](https://firefirebook.firefirestyle.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://firefirebook.firefirestyle.net/tetris/move_left.md).

# 左右に移動する

<https://scratch.mit.edu/projects/84206260/>

![](/files/-LAM1Frqb1Wnqc-UyIG8)

次は左右に移動する機能を追加してみましょう。他のテトロミノや枠に衝突すると移動に失敗します。

## (1) 右に移動する

![](/files/-LAM1FsMNfloKbJPMLEC)

## (2) 左に移動する

![](/files/-LAM1Ft12YTucEUXz607)

## (3) 左キーが押されたら左に、右キーが押されたら右に移動する

![](/files/-LAM1Ftq6WwrQezSzy0X)

## (4) 確認する

![](/files/-LAM1FuJSlhMHfZckk_e)

### (4-1) 右上(みぎうえ)の緑色(みどりいろ)の旗(はた)をクリックする。

### (4-2) 左キーを押すとテトロミノが左に移動すること

### (4-3) 右キーを押すとテトロミノが右に移動すること


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://firefirebook.firefirestyle.net/tetris/move_left.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
