Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
Not Alone
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
Package Registry
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
Anthony ROZEN
Not Alone
Commits
bed0818f
Commit
bed0818f
authored
Dec 23, 2020
by
babablaze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete Extends of Pion, fix Plateau
parent
072a4272
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
60 deletions
+46
-60
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Pion/Pion.java
...ain/java/fr/univnantes/alma/game/composant/Pion/Pion.java
+7
-3
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Pion/PionAssimilation.java
...univnantes/alma/game/composant/Pion/PionAssimilation.java
+0
-25
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Pion/PionSecours.java
...a/fr/univnantes/alma/game/composant/Pion/PionSecours.java
+0
-25
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Plateau.java
.../main/java/fr/univnantes/alma/game/composant/Plateau.java
+39
-7
No files found.
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Pion/Pion.java
View file @
bed0818f
package
fr.univnantes.alma.game.composant.Pion
;
public
abstract
class
Pion
{
public
class
Pion
{
protected
int
position
;
...
...
@@ -8,9 +8,13 @@ public abstract class Pion {
this
.
position
=
position
;
}
public
abstract
int
getPosition
();
public
int
getPosition
(){
return
position
;
}
public
abstract
void
setPosition
(
int
position
);
public
void
setPosition
(
int
position
){
this
.
position
=
position
;
}
@Override
public
String
toString
()
{
...
...
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Pion/PionAssimilation.java
deleted
100644 → 0
View file @
072a4272
package
fr.univnantes.alma.game.composant.Pion
;
public
class
PionAssimilation
extends
Pion
{
public
PionAssimilation
(
int
position
)
{
super
(
position
);
}
@Override
public
int
getPosition
()
{
return
super
.
position
;
}
@Override
public
void
setPosition
(
int
position
)
{
super
.
position
=
position
;
}
@Override
public
String
toString
()
{
return
"PionAssimilation{"
+
"position="
+
super
.
position
+
'}'
;
}
}
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Pion/PionSecours.java
deleted
100644 → 0
View file @
072a4272
package
fr.univnantes.alma.game.composant.Pion
;
public
class
PionSecours
extends
Pion
{
public
PionSecours
(
int
position
)
{
super
(
position
);
}
@Override
public
int
getPosition
()
{
return
super
.
position
;
}
@Override
public
void
setPosition
(
int
position
)
{
super
.
position
=
position
;
}
@Override
public
String
toString
()
{
return
"PionSecours{"
+
"position="
+
super
.
position
+
'}'
;
}
}
not-alone-server/src/main/java/fr/univnantes/alma/game/composant/Plateau.java
View file @
bed0818f
package
fr.univnantes.alma.game.composant
;
import
fr.univnantes.alma.game.composant.Carte.Carte
;
import
fr.univnantes.alma.game.composant.Carte.CarteLieu
;
import
fr.univnantes.alma.game.composant.Pion.PionAssimilation
;
import
fr.univnantes.alma.game.composant.Pion.PionSecours
;
import
fr.univnantes.alma.game.composant.Pion.Pion
;
import
fr.univnantes.alma.game.database.Lieux.*
;
import
java.util.ArrayList
;
...
...
@@ -11,10 +9,12 @@ import java.util.ArrayList;
public
class
Plateau
{
private
ArrayList
<
Carte
>
plateauCarte
;
private
PionAssimilation
pionAssimilation
;
private
PionSecours
pionSecours
;
private
ArrayList
<
Carte
>
reserve
;
private
Pion
pionAssimilation
;
private
Pion
pionSecours
;
public
Plateau
(
int
numberPlayer
){
//initialisation plateau Creature
this
.
plateauCarte
=
new
ArrayList
<>();
this
.
plateauCarte
.
add
(
new
Antre
());
this
.
plateauCarte
.
add
(
new
Jungle
());
...
...
@@ -25,14 +25,46 @@ public class Plateau {
this
.
plateauCarte
.
add
(
new
Epave
());
this
.
plateauCarte
.
add
(
new
Abri
());
this
.
plateauCarte
.
add
(
new
Source
());
this
.
pionAssimilation
=
new
PionAssimilation
(
numberPlayer
);
this
.
pionSecours
=
new
PionSecours
(
numberPlayer
);
this
.
plateauCarte
.
add
(
new
Artefact
());
//Initialisation reserve pioche
this
.
reserve
=
new
ArrayList
<>();
if
(
numberPlayer
==
1
){
this
.
reserve
.
add
(
new
Abri
());
this
.
reserve
.
add
(
new
Epave
());
this
.
reserve
.
add
(
new
Abri
());
this
.
reserve
.
add
(
new
Source
());
this
.
reserve
.
add
(
new
Artefact
());
}
else
if
(
numberPlayer
==
2
||
numberPlayer
==
3
){
for
(
int
i
=
0
;
i
<
2
;
i
++){
this
.
reserve
.
add
(
new
Abri
());
this
.
reserve
.
add
(
new
Epave
());
this
.
reserve
.
add
(
new
Abri
());
this
.
reserve
.
add
(
new
Source
());
this
.
reserve
.
add
(
new
Artefact
());
}
}
else
{
for
(
int
i
=
0
;
i
<
3
;
i
++){
this
.
reserve
.
add
(
new
Abri
());
this
.
reserve
.
add
(
new
Epave
());
this
.
reserve
.
add
(
new
Abri
());
this
.
reserve
.
add
(
new
Source
());
this
.
reserve
.
add
(
new
Artefact
());
}
}
//Initialisation pion Assimilation
this
.
pionAssimilation
=
new
Pion
(
numberPlayer
);
//Initialisation pion Secours
this
.
pionSecours
=
new
Pion
(
numberPlayer
);
}
public
ArrayList
<
Carte
>
getPlateauCarte
()
{
return
plateauCarte
;
}
public
ArrayList
<
Carte
>
getReserve
()
{
return
reserve
;
}
public
PionAssimilation
getPionAssimilation
()
{
return
pionAssimilation
;
}
...
...
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