Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
Java_Yams
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GPSE
4A
Java_Yams
Commits
e15d74a7
Commit
e15d74a7
authored
Jul 24, 2021
by
Weber Rodolphe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Yams.java
parent
a70c6aab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
57 deletions
+0
-57
Yams.java
src/Yams.java
+0
-57
No files found.
src/Yams.java
deleted
100644 → 0
View file @
a70c6aab
/**
* @file Yams.java
* @author WEBER rodolphe <rodolphe.weber@univ-orleans.fr>
* @version 1.0
* @date 24/07/2021
* @mainpage
* @section LICENSE
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* @section DESCRIPTION
*
* This java file represents a java lab for the 4th year students of Polytech Orleans.
*/
import
java.util.Scanner
;
public
class
Yams
{
static
void
clearScreen
(){
System
.
out
.
print
(
"\033[H\033[2J"
);
System
.
out
.
flush
();
}
public
static
void
main
(
String
[]
args
)
{
YamsDices
myDice5
=
new
YamsDices
();
SheetPlayer
player1
=
new
SheetPlayer
(
"Player1"
);
Scanner
sc
=
new
Scanner
(
System
.
in
);
int
figureIndex
;
for
(
int
idx
=
0
;
idx
<
13
;
idx
++){
clearScreen
();
player1
.
printScore
();
myDice5
.
rollYams
(
"12345"
);
//1st roll
myDice5
.
printYams
();
myDice5
.
rollYams
(
myDice5
.
askDice
(
sc
));
//2nd roll
clearScreen
();
player1
.
printScore
();
myDice5
.
printYams
();
figureIndex
=
player1
.
askFigure
(
sc
);
myDice5
.
rollYams
(
myDice5
.
askDice
(
sc
));
//3rd roll
player1
.
updateScoring
(
figureIndex
,
myDice5
.
getScore
(
figureIndex
));
clearScreen
();
player1
.
printScore
();
myDice5
.
printYams
();
System
.
out
.
print
(
"press return"
);
sc
.
nextLine
();
//wait
}
sc
.
close
();
System
.
out
.
println
(
"Player1, your final score : "
+
player1
.
totalScore
());
}
}
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