Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
projetEchecs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NASR Alexis
projetEchecs
Commits
9088838b
Commit
9088838b
authored
Nov 23, 2020
by
Alexis Nasr
Browse files
Options
Downloads
Patches
Plain Diff
modification du nom de la méthode isLegal
parent
9e7605bd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Board.java
+4
-3
4 additions, 3 deletions
Board.java
King.java
+5
-2
5 additions, 2 deletions
King.java
Piece.java
+1
-5
1 addition, 5 deletions
Piece.java
with
10 additions
and
10 deletions
Board.java
+
4
−
3
View file @
9088838b
...
...
@@ -55,6 +55,7 @@ public class Board{
}
public
List
<
Piece
>
getPieces
()
{
return
null
;
}
...
...
@@ -84,7 +85,7 @@ public class Board{
return
false
;
}
public
boolean
same
Line
NothingBetween
(
Coordinates
origin
,
Coordinates
destination
){
public
boolean
same
Row
NothingBetween
(
Coordinates
origin
,
Coordinates
destination
){
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
King.java
+
5
−
2
View file @
9088838b
...
...
@@ -5,11 +5,14 @@ public class King extends Piece {
owner
.
setKing
(
this
);
}
public
boolean
isMove
Legal
(
Board
board
,
Coordinates
destination
){
public
boolean
isMove
Authorized
(
Board
board
,
Coordinates
destination
){
int
dx
=
destination
.
getX
();
int
dy
=
destination
.
getY
();
int
ox
=
this
.
getX
();
int
oy
=
this
.
getY
();
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Piece.java
+
1
−
5
View file @
9088838b
...
...
@@ -48,14 +48,10 @@ public abstract class Piece{
return
true
;
}
public
abstract
boolean
isMove
Legal
(
Board
board
,
Coordinates
destination
);
public
abstract
boolean
isMove
Authorized
(
Board
board
,
Coordinates
destination
);
public
abstract
Type
getType
();
public
abstract
int
getValue
();
public
boolean
isMovePlayable
(
Board
board
,
Coordinates
destination
){
return
true
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment