reworked Mark function to handle Clear function, fixed Goal class to adjusted address format, added shufflecellsfunction
This commit is contained in:
@@ -52,7 +52,7 @@ public partial class Board : Sprite2D
|
||||
public void ClearBoard(){
|
||||
foreach (Cell cell in _cells)
|
||||
{
|
||||
cell.Clear();
|
||||
cell.Mark();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,9 +88,7 @@ public partial class Board : Sprite2D
|
||||
|
||||
public void RenumberCells()
|
||||
{
|
||||
GD.Print(string.Join(", ", _cells.Select(c=>c._address)));
|
||||
_cells = _cells.OrderBy(c => c.Position.Y).ThenBy(c => c.Position.X).ToList();
|
||||
GD.Print(string.Join(", ", _cells.Select(c=>c._address)));
|
||||
|
||||
for (int i = 0; i < _cells.Count; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user