Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROG1004_2022_group4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Magnus Westerheim Johannessen
PROG1004_2022_group4
Commits
1cde2318
Commit
1cde2318
authored
3 years ago
by
aurora
Browse files
Options
Downloads
Patches
Plain Diff
fix: bracket mistakes
parent
19e1a4ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/kode/checkmate.cpp
+6
-9
6 additions, 9 deletions
src/kode/checkmate.cpp
with
6 additions
and
9 deletions
src/kode/checkmate.cpp
+
6
−
9
View file @
1cde2318
...
...
@@ -28,9 +28,9 @@ public:
}
else
return
false
;
};
void
writePlayer
()
const
;
void
updatePlayer
();
int
playerWin
()
{
wins
=
0
;};
int
playerDraws
()
{
draws
=
0
;};
float
playerScore
()
{
score
=
0
;};
void
playerWin
()
{
wins
=
0
;};
void
playerDraws
()
{
draws
=
0
;};
void
playerScore
()
{
score
=
0
;};
void
calculateScore
();
void
writeToFilePlayer
(
ofstream
&
out
);
void
readFromFilePlayer
(
ifstream
&
in
);
...
...
@@ -164,7 +164,7 @@ Player* findPlayerID(const int ID) {
}
}
}
/**
* Calculates the score for a single player
*
...
...
@@ -243,7 +243,7 @@ void Tournament::fillTableArray(){
void
Tournament
::
writeToFileTournament
(
ofstream
&
out
){
for
(
int
i
=
0
;
i
<
gTables
;
i
++
){
out
<<
setw
(
STRLEN
)
<<
player1
[
i
]
out
<<
player1
[
i
]
<<
setw
(
STRLEN
)
<<
player2
[
i
]
<<
setw
(
STRLEN
)
<<
tableNr
[
i
]
<<
"
\n
"
;
...
...
@@ -306,7 +306,7 @@ else if(result == 'D'){
* @see - calculateScore()
*/
void
viewResults
(){
int
temp
[
gPlayers
.
size
();
int
temp
[
gPlayers
.
size
()
]
;
for
(
int
i
=
0
;
i
<
gPlayers
.
size
();
i
++
){
gPlayers
[
i
]
->
calculateScore
();
//Calculates score for every player
...
...
@@ -332,9 +332,6 @@ for(int i=0; i<gPlayers.size(); i++){ //For MVP-purposes no scores can be iden
}
}
/**
* Create a new tournament, with black and white players and what table they're playing at
* @see writeTournament()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment