using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Controls; using System.Windows.Media; using CzokoŚmieciarka.DataModels.Interfaces; namespace CzokoŚmieciarka.WPF.Models { public class Board { int _rows; int _columns; List _tiles = new List(); public Board(int rows, int columns) { _rows = rows; _columns = columns; for (int r = 0; r < rows; r++) { for (int c = 0; c < columns; c++) { string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Images\dirt.jpg"); var Bitmap = new Bitmap(path); _tiles.Add(new Tile() { Data = string.Format("Tile {0}", r*10+c), Img = Bitmap }); } } } public int Rows { get { return _rows; } set { _rows = value; } } public int Columns { get { return _columns; } set { _columns = value; } } public List Tiles { get { return _tiles; } set { _tiles = value; } } } public class Tile { public string Data { get; set; } public Bitmap Img { get; set; } } }