Skip to content

Instantly share code, notes, and snippets.

@n8rzz
Created September 1, 2016 16:21
Show Gist options
  • Save n8rzz/345307170a030b13080dcee7a7ad65bc to your computer and use it in GitHub Desktop.
Save n8rzz/345307170a030b13080dcee7a7ad65bc to your computer and use it in GitHub Desktop.
using System.Collections.Generic;
public class FormationModel
{
public string formationType;
public List<FormationPointModel> pointList = new List<FormationPointModel>();
public FormationModel(string type, List<FormationPointModel> pointsToAdd)
{
formationType = type;
pointList = pointsToAdd;
addPointsToPointList(pointsToAdd);
}
private void addPointsToPointList(List<FormationPointModel> pointsToAdd)
{
for (var i = 0; i < pointsToAdd.Count; i++)
{
pointList.Add(pointsToAdd[i]);
}
}
}
///
/// Supporting Class for above
///
public class FormationPointModel
{
public int level;
public int row;
public int column;
public FormationPointModel(int level, int row, int column)
{
this.level = level;
this.row = row;
this.column = column;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment