Created
September 1, 2016 16:21
-
-
Save n8rzz/345307170a030b13080dcee7a7ad65bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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