public Tile getTile(int x, int y) {
        if (x < 0 || y < 0 || x >= width || y >= height) {
            return Tile.voidTile; //out of boundarys preventer
        }
        if (tiles[x + y * width] == Tile.planks.color_code) {
            return Tile.planks;
        }
        if (tiles[x + y * width] == Tile.bricks_mix.color_code) {
            return Tile.bricks_mix;
        }
        if (tiles[x + y * width] == Tile.bricks.color_code) {
            return Tile.bricks;
        }
        if (tiles[x + y * width] == Tile.grass.color_code) {
            return Tile.grass;
        }

        return Tile.voidTile;
    }