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
LeGroupeTropBien
Not Alone
Commits
0cd55b7f
Commit
0cd55b7f
authored
Dec 04, 2020
by
Philemon CANTEREAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modif jetons
parent
7376f2ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
41 deletions
+74
-41
not-alone-server/src/main/java/fr/univnantes/alma/game/GameController.java
...src/main/java/fr/univnantes/alma/game/GameController.java
+11
-0
not-alone-server/src/main/java/fr/univnantes/alma/game/Jeton.java
...e-server/src/main/java/fr/univnantes/alma/game/Jeton.java
+56
-2
not-alone-server/src/main/java/fr/univnantes/alma/game/JetonAlien.java
...ver/src/main/java/fr/univnantes/alma/game/JetonAlien.java
+5
-12
not-alone-server/src/main/java/fr/univnantes/alma/game/JetonArtemia.java
...r/src/main/java/fr/univnantes/alma/game/JetonArtemia.java
+1
-12
not-alone-server/src/main/java/fr/univnantes/alma/game/JetonCible.java
...ver/src/main/java/fr/univnantes/alma/game/JetonCible.java
+1
-15
No files found.
not-alone-server/src/main/java/fr/univnantes/alma/game/GameController.java
0 → 100644
View file @
0cd55b7f
package
fr.univnantes.alma.game
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
GameController
{
private
List
<
Traque
>
lTraques
=
new
ArrayList
<
Traque
>();
}
not-alone-server/src/main/java/fr/univnantes/alma/game/Jeton.java
View file @
0cd55b7f
package
fr.univnantes.alma.game
;
public
interface
Jeton
{
interface
I
Jeton
{
public
Boolean
jouer
(
Carte
.
carteLieu
lieux
)
throws
Exception
;
public
Boolean
jouer
(
Carte
.
carteLieu
lieux
);
public
void
setDegats
(
int
i
);
public
int
getDegats
();
public
void
setLieu
(
Carte
.
carteLieu
lieu
);
public
Carte
.
carteLieu
getLieu
();
public
void
Reinitialise
();
public
void
AppliqueEffet
(
Traque
t
);
}
public
class
Jeton
implements
IJeton
{
private
Carte
.
carteLieu
lieu
=
null
;
private
int
degats
=
0
;
@Override
public
Boolean
jouer
(
Carte
.
carteLieu
lieux
)
{
if
(
this
.
lieu
==
null
){
this
.
lieu
=
lieu
;
return
true
;
}
else
{
return
false
;
}
}
@Override
public
void
setDegats
(
int
i
)
{
this
.
degats
=
i
;
}
@Override
public
int
getDegats
()
{
return
this
.
degats
;
}
@Override
public
void
setLieu
(
Carte
.
carteLieu
lieu
)
{
this
.
lieu
=
lieu
;
}
@Override
public
Carte
.
carteLieu
getLieu
()
{
return
null
;
}
@Override
public
void
Reinitialise
()
{
this
.
degats
=
0
;
lieu
=
null
;
}
@Override
public
void
AppliqueEffet
(
Traque
t
)
{
t
.
subirDegat
(
this
.
degats
);
}
}
\ No newline at end of file
not-alone-server/src/main/java/fr/univnantes/alma/game/JetonAlien.java
View file @
0cd55b7f
package
fr.univnantes.alma.game
;
public
class
JetonAlien
{
private
Carte
.
carteLieu
lieu
;
public
JetonAlien
(){}
public
Boolean
jouer
(
Carte
.
carteLieu
lieu
){
if
(
this
.
lieu
==
null
){
this
.
lieu
=
lieu
;
return
true
;
}
else
{
return
false
;
}
public
class
JetonAlien
extends
Jeton
{
@Override
public
void
Reinitialise
()
{
this
.
setDegats
(
1
);
this
.
setLieu
(
null
);
}
}
not-alone-server/src/main/java/fr/univnantes/alma/game/JetonArtemia.java
View file @
0cd55b7f
package
fr.univnantes.alma.game
;
public
class
JetonArtemia
implement
s
Jeton
{
public
class
JetonArtemia
extend
s
Jeton
{
private
Carte
.
carteLieu
lieu
;
public
JetonArtemia
(){}
public
Boolean
jouer
(
Carte
.
carteLieu
lieu
)
throws
Exception
{
if
(
this
.
lieu
==
null
){
this
.
lieu
=
lieu
;
return
true
;
}
else
{
return
false
;
}
}
}
\ No newline at end of file
not-alone-server/src/main/java/fr/univnantes/alma/game/JetonCible.java
View file @
0cd55b7f
package
fr.univnantes.alma.game
;
public
class
JetonCible
implement
s
Jeton
{
public
class
JetonCible
extend
s
Jeton
{
private
Carte
.
carteLieu
lieu
;
public
JetonCible
(){}
public
Boolean
jouer
(
Carte
.
carteLieu
lieu
){
if
(
this
.
lieu
==
null
){
this
.
lieu
=
lieu
;
return
true
;
}
else
{
return
false
;
}
}
}
\ 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