using System;
using System.Collections.Generic;
using System.Text;
namespace OnlineUserPool.Model
{
public class MapRecordRanking
{
public int UserId { get; set; }
public string RecordFileName { get; set; }
public int RouteId { get; set; }
public int Ticks { get; set; }
public Guid Id { get; set; }
public string[] record { get; set; }
public string WxHeadImg { get; set; }
public string NickName { get; set; }
///
/// 总点位数据
///
public int Count
{
get
{
return this.record.Length;
}
}
private int _BeginIndex;
///
/// 当前位置
///
public int CurrentIndex
{
get
{
if (_BeginIndex != 0)
{
_BeginIndex++;
if (End)
{
return this.Count - 1;
}
return this._BeginIndex;
}
else
{
_BeginIndex = 1;
return _BeginIndex;
Random random = new Random();
_BeginIndex = random.Next(0, this.Count);
return _BeginIndex;
}
}
}
///
/// 是否已到头
///
public bool End
{
get
{
return this._BeginIndex >= this.Count;
}
}
///
/// 获取当前点位的数据
///
///
public TargetData GetCurrentTargetData()
{
return TargetData.Read(this.record[CurrentIndex]);
}
}
}