Browse Subversion Repository
Contents of /Quantum/QuantumShogi/QuantumShogi.Logic/MoveDirection.cs
Parent Directory
| Revision Log
| 1 |
using System.Diagnostics; |
| 2 |
|
| 3 |
|
| 4 |
namespace QuantumShogi.Logic |
| 5 |
{ |
| 6 |
/// <summary> |
| 7 |
/// 動かす方向の単位 |
| 8 |
/// 縦、横、斜め、直進か、一歩づつか桂馬飛びなどを表現する。 |
| 9 |
/// </summary> |
| 10 |
public class MoveDirection |
| 11 |
{ |
| 12 |
/// <summary> |
| 13 |
/// 横方向の移動方向 |
| 14 |
/// 取りうる値 1,-1,0 |
| 15 |
/// </summary> |
| 16 |
public int Col { get; } |
| 17 |
/// <summary> |
| 18 |
/// 縦方向の移動方向 |
| 19 |
/// 取りうる値 -2,1,-1,0 |
| 20 |
/// </summary> |
| 21 |
public int Row { get; } |
| 22 |
/// <summary> |
| 23 |
/// 直線か一歩づつか |
| 24 |
/// </summary> |
| 25 |
public bool IsLine { get; } |
| 26 |
|
| 27 |
public MoveDirection(int col,int row,bool isLine) |
| 28 |
{ |
| 29 |
Debug.Assert(-1 <= col && col <= 1); |
| 30 |
Debug.Assert(-2 <= row && row <= 1); |
| 31 |
this.Col = col; |
| 32 |
this.Row = row; |
| 33 |
this.IsLine = isLine; |
| 34 |
} |
| 35 |
|
| 36 |
|
| 37 |
} |
| 38 |
} |
| |