Skip to content
Snippets Groups Projects
Unverified Commit 84be4aa9 authored by syuilo's avatar syuilo Committed by GitHub
Browse files

Update reversi-bot.ja-JP.md

parent a943bf39
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ Misskeyのリバーシ機能に対応したBotの開発方法をここに記し
* `pos`として位置情報が含まれている
## 位置の計算法
8x8のマップを考える場合、各マスの位置(Posと呼びます)は次のようになっています:
8x8のマップを考える場合、各マスの位置(インデックスと呼びます)は次のようになっています:
```
+--+--+--+--+--+--+--+--+
| 0| 1| 2| 3| 4| 5| 6| 7|
......@@ -38,7 +38,7 @@ Misskeyのリバーシ機能に対応したBotの開発方法をここに記し
...
```
### X,Y座標 から Pos に変換する
### X,Y座標 から インデックス に変換する
```
pos = x + (y * mapWidth)
```
......@@ -47,7 +47,7 @@ pos = x + (y * mapWidth)
mapWidth = map[0].length
```
### Pos から X,Y座標 に変換する
### インデックス から X,Y座標 に変換する
```
x = pos % mapWidth
y = Math.floor(pos / mapWidth)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment