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
f5a002c7
Commit
f5a002c7
authored
Mar 03, 2015
by
Fardale
Browse files
Merge branch 'master' of gitlab.crans.org:arrighi/prog2
parents
dafc8aa7
11627fcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
boum.scala
View file @
f5a002c7
...
...
@@ -143,28 +143,28 @@ class Demineur {
// Propagation du dévoilement des cases vides
def
propage
(
x
:
Int
,
y
:
Int
){
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
(
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
(
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
(
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
(
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
(
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
(
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
(
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
Supports
Markdown
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