get set for board

test_old_branch
rportet 12 months ago
parent f248a2719e
commit 1a6e080fda

@ -39,5 +39,15 @@ namespace QwirkleClassLibrary
}
return false;
}
public List<Cell> GetCells()
{
return cells;
}
public IReadOnlyCollection<Cell> GetReadCells()
{
return ReadCells;
}
}
}

@ -0,0 +1,31 @@
using QwirkleClassLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestBase
{
public class TestBoard
{
[Fact]
public void TestConstructor()
{
List<Cell> c = new List<Cell>();
for (int i = 0; i < 12; i++)
{
for (int j = 0; j < 12; j++)
{
Cell localcell = new(i, j);
c.Add(localcell);
}
}
Board b = new Board();
Assert.NotNull(c);
Assert.Equal(c, b.GetCells());
}
}
}
Loading…
Cancel
Save