@@ -5,14 +5,29 @@ namespace Unity.MLAgents.Extensions.Match3
5
5
{
6
6
public abstract class AbstractBoard : MonoBehaviour
7
7
{
8
+ /// <summary>
9
+ /// Number of rows on the board
10
+ /// </summary>
8
11
public int Rows ;
12
+
13
+ /// <summary>
14
+ /// Number of columns on the board
15
+ /// </summary>
9
16
public int Columns ;
17
+
18
+ /// <summary>
19
+ /// Maximum number of different types of cells (colors, pieces, etc).
20
+ /// </summary>
10
21
public int NumCellTypes ;
11
- public int NumSpecialTypes ;
12
22
23
+ /// <summary>
24
+ /// Maximum number of special types. This can be zero, in which case
25
+ /// all cells of the same type are assumed to be equivalent.
26
+ /// </summary>
27
+ public int NumSpecialTypes ;
13
28
14
29
/// <summary>
15
- /// Returns the "color" of piece at the given row and column.
30
+ /// Returns the "color" of the piece at the given row and column.
16
31
/// This should be between 0 and NumCellTypes-1 (inclusive).
17
32
/// The actual order of the values doesn't matter.
18
33
/// </summary>
@@ -21,6 +36,14 @@ public abstract class AbstractBoard : MonoBehaviour
21
36
/// <returns></returns>
22
37
public abstract int GetCellType ( int row , int col ) ;
23
38
39
+ /// <summary>
40
+ /// Returns the special type of the piece at the given row and column.
41
+ /// This should be between 0 and NumSpecialTypes (inclusive).
42
+ /// The actual order of the values doesn't matter.
43
+ /// </summary>
44
+ /// <param name="row"></param>
45
+ /// <param name="col"></param>
46
+ /// <returns></returns>
24
47
public abstract int GetSpecialType ( int row , int col ) ;
25
48
26
49
/// <summary>
@@ -41,8 +64,6 @@ public abstract class AbstractBoard : MonoBehaviour
41
64
/// <returns></returns>
42
65
public abstract bool MakeMove ( Move m ) ;
43
66
44
- // TODO handle "special" cell types?
45
-
46
67
public IEnumerable < Move > AllMoves ( )
47
68
{
48
69
var currentMove = Move . FromMoveIndex ( 0 , Rows , Columns ) ;
0 commit comments