Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Guess Game
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Verteilte Systeme
Guess Game
Commits
c27d98ab
Commit
c27d98ab
authored
3 years ago
by
Martin Schmollinger
Browse files
Options
Downloads
Patches
Plain Diff
Renamed status code
parent
27b476e1
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
console-client/app/src/main/java/io/vs/guessgame/client/GuessGameApp.java
+2
-2
2 additions, 2 deletions
...pp/src/main/java/io/vs/guessgame/client/GuessGameApp.java
with
2 additions
and
2 deletions
console-client/app/src/main/java/io/vs/guessgame/client/GuessGameApp.java
+
2
−
2
View file @
c27d98ab
...
...
@@ -14,7 +14,7 @@ public class GuessGameApp {
* Client wins! 2 = Incorrect Guess 9 = Game Over
*/
public
static
final
int
START_GAME
=
0
;
public
static
final
int
GAME_STARTED
=
0
;
public
static
final
int
SERVER_READY
=
0
;
public
static
final
int
CORRECT_GUESS
=
1
;
public
static
final
int
INCORRECT_GUESS
=
2
;
public
static
final
int
GAME_OVER
=
9
;
...
...
@@ -41,7 +41,7 @@ public class GuessGameApp {
//Start game
toServer
.
write
(
START_GAME
);
int
serverCode
=
fromServer
.
read
();
if
(
serverCode
==
GAME_STARTED
)
{
if
(
serverCode
==
SERVER_READY
)
{
System
.
out
.
println
(
"Game started!"
);
}
else
{
throw
new
IllegalStateException
(
"Client and Server not synchronized!"
);
...
...
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