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
0d221e34
Commit
0d221e34
authored
Jul 24, 2021
by
Weber Rodolphe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Dice.java
parent
9a85421a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
67 deletions
+0
-67
Dice.java
src/Dice.java
+0
-67
No files found.
src/Dice.java
deleted
100644 → 0
View file @
9a85421a
/**
* @file
* @author WEBER rodolphe <rodolphe.weber@univ-orleans.fr>
* @version 1.0
* @date 22/07/2021
*
* @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.
*/
/**
* @brief generates a random integer value
*
* the range is between 1 and numberValues
*/
public
class
Dice
{
private
int
numberValues
;
/**< range of the dice */
public
int
diceValue
;
/**< dice value */
/**
* @brief parametrized constructor
* @param numberValues int indicating the dice range
*/
Dice
(
int
numberValues
){
this
.
numberValues
=
numberValues
;
roll
();
}
/**
* @brief default constructor
*/
Dice
(){
numberValues
=
6
;
roll
();
}
/**
* @brief roll the dice
*/
public
void
roll
(){
diceValue
=
(
int
)(
Math
.
random
()*(
numberValues
))+
1
;
}
/**
* @brief print the dice value
*/
public
void
printDice
(){
System
.
out
.
println
(
diceValue
);
}
/**
* @brief get the dice range
* @return int dice range
*/
public
int
getDiceType
(){
return
numberValues
;
}
}
\ No newline at end of file
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