Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Commit

Permalink
to long
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyl18 committed Feb 23, 2018
1 parent 1456cf4 commit eb551e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CardSharp/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class Constants
public const int AmountCardNum = 4; /*每种牌4张*/
public const int MaxPlayer = 3; /*最多3人*/
public const string ConfigDir = "CardSharp";
public const int PointAdd = 10000;
public const long PointAdd = 10000 * (long)int.MaxValue;
public const int BaseScore = 1000;
public const int BoardcastCardNumThreshold = 5;

Expand Down
6 changes: 3 additions & 3 deletions CardSharp/GameComponents/Desk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void FinishGame(Player player)
{
AddMessageLine("SDDC duel done.");

int result = 0;
long result = 0;
switch (player.Type) {
case PlayerType.Farmer:
AddMessageLine("Winners are farmers.");
Expand Down Expand Up @@ -314,7 +314,7 @@ public void FinishGame(Player player)
FinishGame(true);
}

private int SaveSddc(IEnumerable<Player> winners, IEnumerable<Player> losers)
private long SaveSddc(IEnumerable<Player> winners, IEnumerable<Player> losers)
{
var winnersConfig = winners.Select(PlayerConfig.GetConfig).ToList();
var losersConfig = losers.Select(PlayerConfig.GetConfig).ToList();
Expand All @@ -328,7 +328,7 @@ private int SaveSddc(IEnumerable<Player> winners, IEnumerable<Player> losers)
return score;
}

private void SaveScore(PlayerConfig p, int value)
private void SaveScore(PlayerConfig p, long value)
{
var playerConf = p;
playerConf.Point = value;
Expand Down
2 changes: 1 addition & 1 deletion CardSharp/GameComponents/IPlayerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CardSharp.GameComponents
public interface IPlayerConfig
{
DateTime LastTime { get; set; }
int Point { get; set; }
long Point { get; set; }
string PlayerID { get; }
bool IsAdmin { get; }
}
Expand Down
2 changes: 1 addition & 1 deletion CardSharp/GameComponents/PlayerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static PlayerConfig()
}

public string PlayerID { get; }
public int Point { get; set; }
public long Point { get; set; }
public DateTime LastTime { get; set; }

private bool _isAdmin = false;
Expand Down

0 comments on commit eb551e2

Please sign in to comment.