Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lo23-project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin DRUAULT-AUBIN
lo23-project
Commits
d3ced366
Commit
d3ced366
authored
Jan 05, 2018
by
Peining
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add conservation of decimal
parent
6ff43a96
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Battleship/src/main/java/com/utclo23/ihmmain/controller/PlayerProfileController.java
...m/utclo23/ihmmain/controller/PlayerProfileController.java
+3
-2
No files found.
Battleship/src/main/java/com/utclo23/ihmmain/controller/PlayerProfileController.java
View file @
d3ced366
...
...
@@ -15,6 +15,7 @@ import java.text.SimpleDateFormat;
import
java.time.ZoneId
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Formatter
;
import
java.util.List
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
...
...
@@ -33,8 +34,6 @@ import javafx.scene.control.DatePicker;
import
javafx.scene.control.Label
;
import
javafx.scene.image.Image
;
import
javafx.scene.image.ImageView
;
import
javafx.scene.input.KeyCode
;
import
javafx.scene.input.KeyEvent
;
import
javafx.scene.layout.GridPane
;
import
javafx.scene.layout.Pane
;
import
javafx.stage.FileChooser
;
...
...
@@ -241,6 +240,7 @@ public class PlayerProfileController extends AbstractController{
if
(
data
.
get
(
3
)!=
0
){
rate
=
((
double
)
data
.
get
(
0
))/((
double
)
data
.
get
(
3
))*
100
;
}
new
Formatter
().
format
(
"%.2f"
,
rate
);
rateBelgian
.
setText
(
"win rate: "
+
rate
+
"%"
);
}
return
data
;
...
...
@@ -256,6 +256,7 @@ public class PlayerProfileController extends AbstractController{
if
(
data
.
get
(
3
)!=
0
){
rate
=
((
double
)
data
.
get
(
0
))/((
double
)
data
.
get
(
3
))*
100
;
}
new
Formatter
().
format
(
"%.2f"
,
rate
);
rateAll
.
setText
(
"win rate: "
+
rate
+
"%"
);
return
data
;
}
...
...
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