Projektdatei committed
This commit is contained in:
28
src/Map.cs
Normal file
28
src/Map.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
|
||||
|
||||
public class Map
|
||||
{
|
||||
public Tile[,] map;
|
||||
|
||||
public Map(int height, int width)
|
||||
{
|
||||
map = new Tile[height, width];
|
||||
}
|
||||
|
||||
public void setTile(Tile t)
|
||||
{
|
||||
int x= t.getX();
|
||||
int y= t.getY();
|
||||
map.SetValue(t, x, y);
|
||||
}
|
||||
|
||||
public Tile getTile(int x, int y)
|
||||
{
|
||||
|
||||
return map.GetValue(x,y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user