Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Progark gruppe 3
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
Container registry
Model registry
Operate
Environments
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
Tobias Ingebrigt Ørstad
Progark gruppe 3
Commits
e028ed95
Commit
e028ed95
authored
5 years ago
by
Ivar Nordvik Myrstad
Browse files
Options
Downloads
Plain Diff
Merge branch '69-add-round-check-method-in-qi' into 'dev'
Resolve "Add round check method in QI" Closes
#69
See merge request
!64
parents
1ca2f4ae
c95b25f2
No related branches found
No related tags found
1 merge request
!64
Resolve "Add round check method in QI"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/core/src/com/gameware/game/QueryIntermediate.java
+13
-1
13 additions, 1 deletion
frontend/core/src/com/gameware/game/QueryIntermediate.java
frontend/core/src/com/gameware/game/models/RoundCheck.java
+33
-0
33 additions, 0 deletions
frontend/core/src/com/gameware/game/models/RoundCheck.java
with
46 additions
and
1 deletion
frontend/core/src/com/gameware/game/QueryIntermediate.java
+
13
−
1
View file @
e028ed95
...
...
@@ -14,6 +14,7 @@ import com.gameware.game.models.Highscore;
import
com.gameware.game.models.Player
;
import
com.gameware.game.models.Point
;
import
com.gameware.game.models.Round
;
import
com.gameware.game.models.RoundCheck
;
import
com.gameware.game.models.Tournament
;
import
java.io.IOException
;
...
...
@@ -54,7 +55,9 @@ public class QueryIntermediate {
HttpRequest
httpPut
=
new
HttpRequest
(
HttpMethods
.
PUT
);
httpPut
.
setUrl
(
baseUrl
+
route
);
httpPut
.
setHeader
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
if
(
params
!=
null
)
{
httpPut
.
setContent
(
HttpParametersUtils
.
convertHttpParameters
(
params
));
}
return
sendRequest
(
httpPut
);
}
...
...
@@ -207,6 +210,15 @@ public class QueryIntermediate {
return
points
;
}
public
static
RoundCheck
doRoundCheck
(
String
tournamentId
)
throws
IOException
,
NoSuchElementException
{
String
route
=
"tournament/roundcheck/"
+
tournamentId
;
String
[]
response
=
sendPutRequest
(
route
,
null
);
checkStatusCode
(
response
);
RoundCheck
roundCheck
=
json
.
fromJson
(
RoundCheck
.
class
,
response
[
1
]);
checkObjectNotNull
(
roundCheck
);
return
roundCheck
;
}
// ---------------- Highscore methods ----------------
public
static
List
<
Highscore
>
getHighscoresForGame
(
String
gameId
)
throws
IOException
,
NoSuchElementException
{
String
route
=
"highscores/gamescores/"
+
gameId
;
...
...
This diff is collapsed.
Click to expand it.
frontend/core/src/com/gameware/game/models/RoundCheck.java
0 → 100644
+
33
−
0
View file @
e028ed95
package
com.gameware.game.models
;
import
com.badlogic.gdx.utils.Json
;
public
class
RoundCheck
implements
ModelInterface
{
private
boolean
active
;
private
boolean
nextRound
;
public
RoundCheck
()
{
}
public
boolean
isActive
()
{
return
active
;
}
public
boolean
isNextRound
()
{
return
nextRound
;
}
@Override
public
void
reset
()
{
active
=
false
;
nextRound
=
false
;
}
@Override
public
String
report
()
{
return
new
Json
().
toJson
(
this
);}
@Override
public
String
toString
()
{
return
report
();
}
}
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