-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResult.cs
40 lines (36 loc) · 883 Bytes
/
Result.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Labyrinth
{
class Result: IComparable<Result>
{
private int movesCount;
private string playerName;
public Result(int movesCount, string playerName)
{
this.movesCount = movesCount;
this.playerName = playerName;
}
public int MovesCount
{
get
{
return this.movesCount;
}
}
public string PlayerName
{
get
{
return this.playerName;
}
}
public int CompareTo(Result other)
{
int compareResult = this.MovesCount.CompareTo(other.MovesCount);
return compareResult;
}
}
}