Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Raph El
android
Commits
e30d84a0
Commit
e30d84a0
authored
Mar 18, 2015
by
LucMerceron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctif N°3 switchSide & switchService -- Tested & Approved
parent
9b17e0d9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
57 deletions
+57
-57
app/src/main/java/fr/istic/masteru/android/automate/AutomateDouble.java
...ava/fr/istic/masteru/android/automate/AutomateDouble.java
+18
-18
app/src/main/java/fr/istic/masteru/android/automate/AutomateDoublePro.java
.../fr/istic/masteru/android/automate/AutomateDoublePro.java
+18
-18
app/src/main/java/fr/istic/masteru/android/automate/AutomateSimple.java
...ava/fr/istic/masteru/android/automate/AutomateSimple.java
+18
-18
app/src/main/java/fr/istic/masteru/android/automate/DoublePoint.java
...n/java/fr/istic/masteru/android/automate/DoublePoint.java
+1
-1
app/src/main/java/fr/istic/masteru/android/automate/DoubleProPoint.java
...ava/fr/istic/masteru/android/automate/DoubleProPoint.java
+1
-1
app/src/main/java/fr/istic/masteru/android/automate/SimplePoint.java
...n/java/fr/istic/masteru/android/automate/SimplePoint.java
+1
-1
No files found.
app/src/main/java/fr/istic/masteru/android/automate/AutomateDouble.java
View file @
e30d84a0
...
...
@@ -153,27 +153,27 @@ public class AutomateDouble implements Automate {
@Override
public
Point
switchSide
()
{
Stats
stat
=
new
Stats
()
;
Stats
stat
=
null
;
Score
score1
=
null
;
InfoScore
infoScore
=
new
InfoScore
()
;
InfoScore
infoScore
;
Point
point
=
null
;
Step
step
=
null
;
/* Modifier l'état du score
actuel
*/
this
.
score
.
setSideLeftA
(!
this
.
score
.
isSideLeftA
());
/* Modifier l'état du score
de l'automate
*/
DoublePoint
.
score
.
setSideLeftA
(!
DoublePoint
.
score
.
isSideLeftA
());
/* Modifier l'état dans la pile */
/* Modifier l'état dans
le fichier et
la pile */
step
=
pile
.
get
(
pile
.
size
()
-
1
);
infoScore
=
step
.
getInfoScore
().
copy
();
stat
=
step
.
getStats
().
copy
();
if
(
step
.
getStats
()!=
null
)
{
stat
=
step
.
getStats
().
copy
();
}
infoScore
.
setSideLeftA
(!
infoScore
.
isSideLeftA
());
step
=
new
Step
(
infoScore
,
stat
);
pile
.
setElementAt
(
step
,
pile
.
size
()-
1
);
/* Modifier l'état dans le fichier */
point
=
new
Point
(
infoScore
.
getScore
(),
stat
);
FileManager
.
deleteLast
(
context
);
FileManager
.
point
(
context
,
point
);
...
...
@@ -184,28 +184,28 @@ public class AutomateDouble implements Automate {
@Override
public
Point
switchService
()
{
Stats
stat
=
new
Stats
()
;
Stats
stat
=
null
;
Score
score1
=
null
;
InfoScore
infoScore
=
new
InfoScore
()
;
InfoScore
infoScore
;
Point
point
=
null
;
Step
step
=
null
;
/* Modifier l'état du score
actuel
*/
this
.
score
.
set
First
Service
((
this
.
score
.
get
First
Service
()
+
1
)
%
2
);
/* Modifier l'état du score
de l'automate
*/
DoublePoint
.
score
.
setService
((
DoublePoint
.
score
.
getService
()
+
1
)
%
2
);
/* Modifier l'état dans la pile */
/* Modifier l'état dans
le fichier et
la pile */
step
=
pile
.
get
(
pile
.
size
()
-
1
);
infoScore
=
step
.
getInfoScore
().
copy
();
stat
=
step
.
getStats
().
copy
();
if
(
step
.
getStats
()!=
null
)
{
stat
=
step
.
getStats
().
copy
();
}
infoScore
.
set
First
Service
((
infoScore
.
get
First
Service
()
+
1
)
%
2
);
infoScore
.
setService
((
infoScore
.
getService
()
+
1
)
%
2
);
step
=
new
Step
(
infoScore
,
stat
);
pile
.
setElementAt
(
step
,
pile
.
size
()-
1
);
/* Modifier l'état dans le fichier */
point
=
new
Point
(
infoScore
.
getScore
(),
stat
);
FileManager
.
deleteLast
(
context
);
FileManager
.
point
(
context
,
point
);
...
...
app/src/main/java/fr/istic/masteru/android/automate/AutomateDoublePro.java
View file @
e30d84a0
...
...
@@ -143,27 +143,27 @@ public class AutomateDoublePro implements Automate {
@Override
public
Point
switchSide
()
{
Stats
stat
=
new
Stats
()
;
Stats
stat
=
null
;
Score
score1
=
null
;
InfoScore
infoScore
=
new
InfoScore
()
;
InfoScore
infoScore
;
Point
point
=
null
;
Step
step
=
null
;
/* Modifier l'état du score
actuel
*/
this
.
score
.
setSideLeftA
(!
this
.
score
.
isSideLeftA
());
/* Modifier l'état du score
de l'automate
*/
DoublePoint
.
score
.
setSideLeftA
(!
DoublePoint
.
score
.
isSideLeftA
());
/* Modifier l'état dans la pile */
/* Modifier l'état dans
le fichier et
la pile */
step
=
pile
.
get
(
pile
.
size
()
-
1
);
infoScore
=
step
.
getInfoScore
().
copy
();
stat
=
step
.
getStats
().
copy
();
if
(
step
.
getStats
()!=
null
)
{
stat
=
step
.
getStats
().
copy
();
}
infoScore
.
setSideLeftA
(!
infoScore
.
isSideLeftA
());
step
=
new
Step
(
infoScore
,
stat
);
pile
.
setElementAt
(
step
,
pile
.
size
()-
1
);
/* Modifier l'état dans le fichier */
point
=
new
Point
(
infoScore
.
getScore
(),
stat
);
FileManager
.
deleteLast
(
context
);
FileManager
.
point
(
context
,
point
);
...
...
@@ -174,28 +174,28 @@ public class AutomateDoublePro implements Automate {
@Override
public
Point
switchService
()
{
Stats
stat
=
new
Stats
()
;
Stats
stat
=
null
;
Score
score1
=
null
;
InfoScore
infoScore
=
new
InfoScore
()
;
InfoScore
infoScore
;
Point
point
=
null
;
Step
step
=
null
;
/* Modifier l'état du score
actuel
*/
this
.
score
.
set
First
Service
((
this
.
score
.
get
First
Service
()
+
1
)
%
2
);
/* Modifier l'état du score
de l'automate
*/
DoublePoint
.
score
.
setService
((
DoublePoint
.
score
.
getService
()
+
1
)
%
2
);
/* Modifier l'état dans la pile */
/* Modifier l'état dans
le fichier et
la pile */
step
=
pile
.
get
(
pile
.
size
()
-
1
);
infoScore
=
step
.
getInfoScore
().
copy
();
stat
=
step
.
getStats
().
copy
();
if
(
step
.
getStats
()!=
null
)
{
stat
=
step
.
getStats
().
copy
();
}
infoScore
.
set
First
Service
((
infoScore
.
get
First
Service
()
+
1
)
%
2
);
infoScore
.
setService
((
infoScore
.
getService
()
+
1
)
%
2
);
step
=
new
Step
(
infoScore
,
stat
);
pile
.
setElementAt
(
step
,
pile
.
size
()-
1
);
/* Modifier l'état dans le fichier */
point
=
new
Point
(
infoScore
.
getScore
(),
stat
);
FileManager
.
deleteLast
(
context
);
FileManager
.
point
(
context
,
point
);
...
...
app/src/main/java/fr/istic/masteru/android/automate/AutomateSimple.java
View file @
e30d84a0
...
...
@@ -144,27 +144,27 @@ public class AutomateSimple implements Automate {
@Override
public
Point
switchSide
()
{
Stats
stat
=
new
Stats
()
;
Stats
stat
=
null
;
Score
score1
=
null
;
InfoScore
infoScore
=
new
InfoScore
()
;
InfoScore
infoScore
;
Point
point
=
null
;
Step
step
=
null
;
/* Modifier l'état du score
actuel
*/
this
.
score
.
setSideLeftA
(!
this
.
score
.
isSideLeftA
());
/* Modifier l'état du score
de l'automate
*/
DoublePoint
.
score
.
setSideLeftA
(!
DoublePoint
.
score
.
isSideLeftA
());
/* Modifier l'état dans la pile */
/* Modifier l'état dans
le fichier et
la pile */
step
=
pile
.
get
(
pile
.
size
()
-
1
);
infoScore
=
step
.
getInfoScore
().
copy
();
stat
=
step
.
getStats
().
copy
();
if
(
step
.
getStats
()!=
null
)
{
stat
=
step
.
getStats
().
copy
();
}
infoScore
.
setSideLeftA
(!
infoScore
.
isSideLeftA
());
step
=
new
Step
(
infoScore
,
stat
);
pile
.
setElementAt
(
step
,
pile
.
size
()-
1
);
/* Modifier l'état dans le fichier */
point
=
new
Point
(
infoScore
.
getScore
(),
stat
);
FileManager
.
deleteLast
(
context
);
FileManager
.
point
(
context
,
point
);
...
...
@@ -175,28 +175,28 @@ public class AutomateSimple implements Automate {
@Override
public
Point
switchService
()
{
Stats
stat
=
new
Stats
()
;
Stats
stat
=
null
;
Score
score1
=
null
;
InfoScore
infoScore
=
new
InfoScore
()
;
InfoScore
infoScore
;
Point
point
=
null
;
Step
step
=
null
;
/* Modifier l'état du score
actuel
*/
this
.
score
.
set
First
Service
((
this
.
score
.
get
First
Service
()
+
1
)
%
2
);
/* Modifier l'état du score
de l'automate
*/
DoublePoint
.
score
.
setService
((
DoublePoint
.
score
.
getService
()
+
1
)
%
2
);
/* Modifier l'état dans la pile */
/* Modifier l'état dans
le fichier et
la pile */
step
=
pile
.
get
(
pile
.
size
()
-
1
);
infoScore
=
step
.
getInfoScore
().
copy
();
stat
=
step
.
getStats
().
copy
();
if
(
step
.
getStats
()!=
null
)
{
stat
=
step
.
getStats
().
copy
();
}
infoScore
.
set
First
Service
((
infoScore
.
get
First
Service
()
+
1
)
%
2
);
infoScore
.
setService
((
infoScore
.
getService
()
+
1
)
%
2
);
step
=
new
Step
(
infoScore
,
stat
);
pile
.
setElementAt
(
step
,
pile
.
size
()-
1
);
/* Modifier l'état dans le fichier */
point
=
new
Point
(
infoScore
.
getScore
(),
stat
);
FileManager
.
deleteLast
(
context
);
FileManager
.
point
(
context
,
point
);
...
...
app/src/main/java/fr/istic/masteru/android/automate/DoublePoint.java
View file @
e30d84a0
...
...
@@ -43,7 +43,7 @@ public class DoublePoint {
/*30:40*/
{
15
,
0
},
/*40:40*/
{
0
,
0
},
};
p
rivate
static
InfoScore
score
;
p
ublic
static
InfoScore
score
;
private
static
int
a
,
b
,
c
,
d
,
e
,
f
;
public
static
InfoScore
executer
(
int
numact
)
{
...
...
app/src/main/java/fr/istic/masteru/android/automate/DoubleProPoint.java
View file @
e30d84a0
...
...
@@ -44,7 +44,7 @@ public class DoubleProPoint {
/*40:40*/
{
0
,
0
},
};
p
rivate
static
InfoScore
score
;
p
ublic
static
InfoScore
score
;
private
static
int
a
,
b
,
c
,
d
,
e
,
f
;
public
static
InfoScore
executer
(
int
numact
)
{
...
...
app/src/main/java/fr/istic/masteru/android/automate/SimplePoint.java
View file @
e30d84a0
...
...
@@ -51,7 +51,7 @@ public class SimplePoint {
/*0:AD*/
{
15
,
0
}
};
p
rivate
static
InfoScore
score
;
p
ublic
static
InfoScore
score
;
private
static
int
a
,
b
,
c
,
d
,
e
,
f
;
public
static
InfoScore
executer
(
int
numact
)
{
...
...
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