Archived
1
0
This repository has been archived on 2021-10-19. You can view files and clone it, but cannot push or open issues or pull requests.
nonabgs/BGS/CombatZone.cs

33 lines
905 B
C#
Raw Permalink Normal View History

using System;
using System.Linq;
namespace NonaBGS.BGS {
public class CombatZone : LogEntry, IComparable {
public string Type { get; set; }
public string Grade { get; set; }
public int Amount { get; set; }
public int CompareTo(object obj) {
if (obj.GetType() != typeof(CombatZone)) {
return -1;
}
var b = obj as CombatZone;
if (b.Faction != Faction || b.System != System) {
return -1; // System and faction don't match
}
if (b.Type != b.Type || b.Grade != b.Grade) {
return -1; // grade and type don't match
}
return 0;
}
public override string ToString() {
return string.Format("Won {0} x {1} {2} Combat Zone(s) for {3}",
Amount, Grade, Type, Faction);
}
2021-07-09 11:03:30 +02:00
}
}