Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fardale
Prog2
Commits
11627fcf
Commit
11627fcf
authored
Mar 03, 2015
by
Fardale
Browse files
Propage pour le premier clique
parent
02afd77f
Changes
1
Show whitespace changes
Inline
Side-by-side
boum.scala
View file @
11627fcf
...
@@ -143,28 +143,28 @@ class Demineur {
...
@@ -143,28 +143,28 @@ class Demineur {
// Propagation du dévoilement des cases vides
// Propagation du dévoilement des cases vides
def
propage
(
x
:
Int
,
y
:
Int
){
def
propage
(
x
:
Int
,
y
:
Int
){
if
(
x
>
0
)
{
if
(
x
>
0
)
{
if
(
boutons
(
x
-
1
)(
y
).
enabled
){
clique_action
(
x
-
1
,
y
)}
if
(
boutons
(
x
-
1
)(
y
).
enabled
&&
champ
(
x
-
1
)(
y
)
!=
9
){
clique_action
(
x
-
1
,
y
)}
if
(
y
>
0
){
if
(
y
>
0
){
if
(
boutons
(
x
-
1
)(
y
-
1
).
enabled
){
clique_action
(
x
-
1
,
y
-
1
)}
if
(
boutons
(
x
-
1
)(
y
-
1
).
enabled
&&
champ
(
x
-
1
)(
y
-
1
)
!=
9
){
clique_action
(
x
-
1
,
y
-
1
)}
}
}
if
(
y
<
tailleY
-
1
){
if
(
y
<
tailleY
-
1
){
if
(
boutons
(
x
-
1
)(
y
+
1
).
enabled
){
clique_action
(
x
-
1
,
y
+
1
)}
if
(
boutons
(
x
-
1
)(
y
+
1
).
enabled
&&
champ
(
x
-
1
)(
y
+
1
)
!=
9
){
clique_action
(
x
-
1
,
y
+
1
)}
}
}
}
}
if
(
x
<
tailleX
-
1
)
{
if
(
x
<
tailleX
-
1
)
{
if
(
boutons
(
x
+
1
)(
y
).
enabled
){
clique_action
(
x
+
1
,
y
)}
if
(
boutons
(
x
+
1
)(
y
).
enabled
&&
champ
(
x
+
1
)(
y
)
!=
9
){
clique_action
(
x
+
1
,
y
)}
if
(
y
>
0
){
if
(
y
>
0
){
if
(
boutons
(
x
+
1
)(
y
-
1
).
enabled
){
clique_action
(
x
+
1
,
y
-
1
)}
if
(
boutons
(
x
+
1
)(
y
-
1
).
enabled
&&
champ
(
x
+
1
)(
y
-
1
)
!=
9
){
clique_action
(
x
+
1
,
y
-
1
)}
}
}
if
(
y
<
tailleY
-
1
){
if
(
y
<
tailleY
-
1
){
if
(
boutons
(
x
+
1
)(
y
+
1
).
enabled
){
clique_action
(
x
+
1
,
y
+
1
)}
if
(
boutons
(
x
+
1
)(
y
+
1
).
enabled
&&
champ
(
x
+
1
)(
y
+
1
)
!=
9
){
clique_action
(
x
+
1
,
y
+
1
)}
}
}
}
}
if
(
y
>
0
){
if
(
y
>
0
){
if
(
boutons
(
x
)(
y
-
1
).
enabled
){
clique_action
(
x
,
y
-
1
)}
if
(
boutons
(
x
)(
y
-
1
).
enabled
&&
champ
(
x
)(
y
-
1
)
!=
9
){
clique_action
(
x
,
y
-
1
)}
}
}
if
(
y
<
tailleY
-
1
){
if
(
y
<
tailleY
-
1
){
if
(
boutons
(
x
)(
y
+
1
).
enabled
){
clique_action
(
x
,
y
+
1
)}
if
(
boutons
(
x
)(
y
+
1
).
enabled
&&
champ
(
x
)(
y
+
1
)
!=
9
){
clique_action
(
x
,
y
+
1
)}
}
}
}
}
...
...
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