Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tp6 Flood
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Releases
Package 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
EL GAOUAL Zaid
Tp6 Flood
Commits
a83e40a2
Commit
a83e40a2
authored
2 years ago
by
BEL KHALIFA Mohamed amine
Browse files
Options
Downloads
Patches
Plain Diff
player
parent
9b1f0e72
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/model/HumanPlayer.java
+37
-0
37 additions, 0 deletions
app/src/main/java/model/HumanPlayer.java
app/src/main/java/model/Player.java
+7
-0
7 additions, 0 deletions
app/src/main/java/model/Player.java
with
44 additions
and
0 deletions
app/src/main/java/model/HumanPlayer.java
0 → 100644
+
37
−
0
View file @
a83e40a2
package
model
;
public
class
HumanPlayer
implements
Player
{
private
String
name
;
private
Cell
startCell
;
HumanPlayer
(
String
name
,
Cell
startCell
)
{
this
.
name
=
name
;
this
.
startCell
=
startCell
;
}
HumanPlayer
(
Cell
startCell1
)
{
this
.
startCell
=
startCell1
;
}
@Override
public
boolean
isHuman
()
{
return
true
;
}
@Override
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Override
public
String
getName
()
{
return
name
;
}
@Override
public
Cell
getStartCell
()
{
return
startCell
;
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/model/Player.java
+
7
−
0
View file @
a83e40a2
...
@@ -2,4 +2,11 @@ package model;
...
@@ -2,4 +2,11 @@ package model;
public
interface
Player
{
public
interface
Player
{
boolean
isHuman
();
boolean
isHuman
();
void
setName
(
String
name
);
String
getName
();
Cell
getStartCell
();
}
}
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