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
c50deb07
Commit
c50deb07
authored
3 years ago
by
TheHresvelgian
Browse files
Options
Downloads
Patches
Plain Diff
Organizing code
parent
dcd16e19
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/kode/Tournament.cpp
+29
-0
29 additions, 0 deletions
src/kode/Tournament.cpp
src/kode/searchByID.cpp
+1
-0
1 addition, 0 deletions
src/kode/searchByID.cpp
with
30 additions
and
0 deletions
src/kode/Tournament.cpp
+
29
−
0
View file @
c50deb07
...
...
@@ -11,6 +11,7 @@
#include
<fstream>
// ifstream, ofstream
#include
"LesData2.h"
#include
"player.h"
#include
"functions.h"
using
namespace
std
;
...
...
@@ -47,9 +48,12 @@ void Tournament::startNewTournament()
void
Tournament
::
enterResults
()
{
for
(
int
i
=
0
;
i
<
nrOfTables
;
++
i
)
{
}
}
void
Tournament
::
printTables
()
{
...
...
@@ -59,6 +63,31 @@ void Tournament::printTables()
<<
" please add or remove players so that there is exactly two players per table."
<<
endl
;
return
;
}
white
.
clear
();
black
.
clear
();
currentRound
++
;
if
(
currentRound
==
1
)
{
vector
<
Player
*>
playersPlaying
=
playerList
;
for
(
int
i
=
0
;
i
<
nrOfTables
;
++
i
)
{
white
.
push_back
(
playersPlaying
[
playersPlaying
.
size
()
-
1
]
->
playerID
);
playersPlaying
.
pop_back
();
black
.
push_back
(
playersPlaying
[
playersPlaying
.
size
()
-
1
]
->
playerID
);
playersPlaying
.
pop_back
();
cout
<<
endl
<<
"Table "
<<
i
<<
":
\t
"
<<
}
}
else
{
vector
<
Player
*>
playersPlaying
=
sortedRankings
;
sortRanking
();
do
{
}
while
(
playersPlaying
>
0
);
}
}
bool
Tournament
::
canStartRound
()
...
...
This diff is collapsed.
Click to expand it.
src/kode/searchByID.cpp
+
1
−
0
View file @
c50deb07
...
...
@@ -11,6 +11,7 @@ int searchByID(int id, int list)
vector
<
Player
*>
listToUse
;
if
(
list
==
1
)
{
listToUse
=
playerList
;
}
else
if
(
list
==
2
)
{
...
...
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