I am coding my first game in C#, and I am still pretty new to C#. Coming from javascript, I tend to make big objects and then pass them to a function that then deals with it. Is it a good approach to use the same concept in C#?
Le example
public struct GameParams {
public List<Player> players;
public int gridX = 0;
public int gridY = 0;
}
class Game{
private Grid grid;
private List<Players> players;
public Game(GameParams gameParams) {
grid = new Grid(gameParams.gridX, gameParams.gridY);
players = gameParams.players;
dostuff();
}
}
Does this make any sense?