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
ba6fb711
Commit
ba6fb711
authored
Oct 23, 2019
by
李静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
persons[j].GetHashCode()在特定的电脑和运行环境下的值是固定的,会导致部分人在指定电脑上的得分比较高
parent
cb67e02d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Program.cs
Lottery/Lottery/Program.cs
+1
-1
No files found.
Lottery/Lottery/Program.cs
View file @
ba6fb711
...
@@ -50,7 +50,7 @@ namespace Lottery
...
@@ -50,7 +50,7 @@ namespace Lottery
//计分方式3:随即加上一个人的金币,看能否逆袭
//计分方式3:随即加上一个人的金币,看能否逆袭
//其他方式:可在下方对NewGrade属性进行操作
//其他方式:可在下方对NewGrade属性进行操作
persons
[
j
].
NewGrade
+=
(
randoms
[
j
]
+
persons
[
j
].
NewGrade
+=
(
randoms
[
j
]
+
(
Math
.
Abs
(
persons
[
j
].
GetHashCode
()
<<
1
)
%
persons
.
Count
)
+
//
(Math.Abs(persons[j].GetHashCode() << 1) % persons.Count) +
persons
[
randoms
[
j
]
-
1
].
OldGrade
);
persons
[
randoms
[
j
]
-
1
].
OldGrade
);
if
(
i
==
3
&&
persons
[
j
].
BaseGrade
>
0
)
if
(
i
==
3
&&
persons
[
j
].
BaseGrade
>
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