Merge branch 'master' into 'caiweiguo/Lottery-master'

# Conflicts:
#   Lottery/Lottery/Program.cs
parents 5580a06f e08b9f48
...@@ -26,7 +26,7 @@ namespace Lottery ...@@ -26,7 +26,7 @@ namespace Lottery
IReadOnlyList<Lottery> lotteries = Lottery.GetLotteries(); IReadOnlyList<Lottery> lotteries = Lottery.GetLotteries();
if (persons.Count == 0) if (persons.Count == 0)
{ {
Console.WriteLine(Environment.NewLine + "未找到抽奖人员,请在程序生成目录下编写p.txt文件,每个人名占一行"); Console.WriteLine(Environment.NewLine + "未找到抽奖人员,请在程序生成目录下编写p.csv文件,每个人名占一行");
Console.ReadLine(); Console.ReadLine();
return; return;
} }
...@@ -47,7 +47,15 @@ namespace Lottery ...@@ -47,7 +47,15 @@ namespace Lottery
IReadOnlyList<int> indexRandoms = RandomOrg.GetIntRandomsAsync(persons.Count).Result; IReadOnlyList<int> indexRandoms = RandomOrg.GetIntRandomsAsync(persons.Count).Result;
if (indexRandoms != null) if (indexRandoms != null)
{ {
for (int j = 0; j < indexRandoms.Count; j++) //计分方式1:根据返回的随机数加金币
//计分方式2:看命
//计分方式3:随机加上一个人的金币,看能否逆袭
//其他方式:可在下方对NewGrade属性进行操作
persons[j].NewGrade += (randoms[j] +
(Math.Abs(persons[j].GetHashCode() << 1) % persons.Count) +
persons[randoms[j] - 1].OldGrade);
if (i == 3 && persons[j].BaseGrade > 0)
{ {
//计分方式1:根据返回的随机数加金币 //计分方式1:根据返回的随机数加金币
//计分方式2:看命 //计分方式2:看命
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
曾沂轮,0 曾沂轮,0
罗学周,0 罗学周,0
刘培,0 刘培,0
张启明,0
吴思铭,0 吴思铭,0
陈辉,0 陈辉,0
毛福寿,0 毛福寿,0
...@@ -70,6 +69,7 @@ ...@@ -70,6 +69,7 @@
严韵诗,0 严韵诗,0
蔡增威,0 蔡增威,0
侯祥意,0 侯祥意,0
张启明,0
韦哲,0 韦哲,0
高波,0 高波,0
刘国民,0 刘国民,0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment