[longomatch] Add Nationality property to players



commit e0aa1127b39f17e923c8a2e010947059c87bd87f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Oct 25 15:03:04 2010 +0200

    Add Nationality property to players

 LongoMatch/DB/TeamTemplate.cs |    2 +-
 LongoMatch/Time/Player.cs     |   22 ++++++++++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch/DB/TeamTemplate.cs b/LongoMatch/DB/TeamTemplate.cs
index aac6397..cfd5735 100644
--- a/LongoMatch/DB/TeamTemplate.cs
+++ b/LongoMatch/DB/TeamTemplate.cs
@@ -47,7 +47,7 @@ namespace LongoMatch.DB
 
 		public void CreateDefaultTemplate(int playersCount) {
 			for (int i=0; i<playersCount;i++) {
-				playersList.Add(new Player("Player "+i, new DateTime(),0,0,"",i,null));
+				playersList.Add(new Player("Player "+i, new DateTime(),"", 0,0,"",i,null));
 			}
 		}
 
diff --git a/LongoMatch/Time/Player.cs b/LongoMatch/Time/Player.cs
index 26b2333..911b56d 100644
--- a/LongoMatch/Time/Player.cs
+++ b/LongoMatch/Time/Player.cs
@@ -35,6 +35,7 @@ namespace LongoMatch.TimeNodes
 		private float height;
 		private int weight;
 		private DateTime birthday;
+		private String nationality;
 
 		/// <summary>
 		/// Creates a new player
@@ -45,6 +46,9 @@ namespace LongoMatch.TimeNodes
 		/// <param name="birthday">
 		/// A <see cref="DateTime"/> with my name
 		/// </param>
+		/// <param name="nationality">
+		/// A <see cref="System.String"/> with my nationality
+		/// </param>
 		/// <param name="height">
 		/// A <see cref="System.Float"/> with my height
 		/// </param>
@@ -61,11 +65,13 @@ namespace LongoMatch.TimeNodes
 		/// A <see cref="Pixbuf"/> with my photo
 		/// </param>
 		#region Constructors
-		public Player(string name, DateTime birthday, float height, int weight,
-		              string position, int number, Pixbuf photo)
+		public Player(string name, DateTime birthday, String nationality, 
+		              float height, int weight, string position,
+		              int number, Pixbuf photo)
 		{
 			this.name = name;
 			this.birthday = birthday;
+			this.nationality = nationality;
 			this.height = height;
 			this.weight = weight;
 			this.position = position;
@@ -142,6 +148,18 @@ namespace LongoMatch.TimeNodes
 		}
 		
 		/// <value>
+		/// My nationality
+		/// </value>
+		public String Nationality{
+			get {
+				return nationality;
+			}
+			set {
+				nationality = value;
+			}
+		}
+		
+		/// <value>
 		/// My height
 		/// </value>
 		public float Height{



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]