Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
Lottery
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
十年打工还是工,梭哈一夜往皇宫
Lottery
Commits
f73e5c7e
Commit
f73e5c7e
authored
Oct 24, 2019
by
十年打工还是工,梭哈一夜往皇宫
🤡
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'caiweiguo/Lottery-master'
# Conflicts: # Lottery/Lottery/Program.cs
parents
5580a06f
e08b9f48
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
Program.cs
Lottery/Lottery/Program.cs
+10
-2
p.csv
Lottery/Lottery/p.csv
+1
-1
No files found.
Lottery/Lottery/Program.cs
View file @
f73e5c7e
...
...
@@ -26,7 +26,7 @@ namespace Lottery
IReadOnlyList
<
Lottery
>
lotteries
=
Lottery
.
GetLotteries
();
if
(
persons
.
Count
==
0
)
{
Console
.
WriteLine
(
Environment
.
NewLine
+
"未找到抽奖人员,请在程序生成目录下编写p.
txt
文件,每个人名占一行"
);
Console
.
WriteLine
(
Environment
.
NewLine
+
"未找到抽奖人员,请在程序生成目录下编写p.
csv
文件,每个人名占一行"
);
Console
.
ReadLine
();
return
;
}
...
...
@@ -47,7 +47,15 @@ namespace Lottery
IReadOnlyList
<
int
>
indexRandoms
=
RandomOrg
.
GetIntRandomsAsync
(
persons
.
Count
).
Result
;
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:根据返回的随机数加金币
//计分方式2:看命
...
...
Lottery/Lottery/p.csv
View file @
f73e5c7e
...
...
@@ -4,7 +4,6 @@
曾沂轮,0
罗学周,0
刘培,0
张启明,0
吴思铭,0
陈辉,0
毛福寿,0
...
...
@@ -70,6 +69,7 @@
严韵诗,0
蔡增威,0
侯祥意,0
张启明,0
韦哲,0
高波,0
刘国民,0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment