Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chess_programming
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Radia EL HAMDOUNI
chess_programming
Commits
6ef35c26
Commit
6ef35c26
authored
Oct 30, 2020
by
Radia EL HAMDOUNI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete chess_engine.c
parent
7bd0bcc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
85 deletions
+0
-85
chess_engine.c
chess_engine.c
+0
-85
No files found.
chess_engine.c
deleted
100644 → 0
View file @
7bd0bcc2
// Libraries
#include<stdio.h>
// files
#include "board.h"
#include "fen.c"
// Print the board to the console
void
show_board
(){
// pint new line
printf
(
"
\n\n\n
"
);
// A rank is a line
// A file is a column
for
(
int
i
=
0
;
i
<
8
;
i
++
){
//loop over the ranks
for
(
int
j
=
0
;
j
<
16
;
j
++
){
// loop over the files
int
square
=
16
*
i
+
j
;
if
(
j
==
0
){
printf
(
"%d "
,
8
-
i
);
// print ranks
}
// print the board's valid quares
if
(
!
(
square
&
0x88
)){
printf
(
"%s"
,
chess_pieces
[
board
[
square
]]);
}
}
printf
(
"
\n
"
);
}
printf
(
"
\n
a b c d e f g h
\n\n\n
"
);
// print files
}
// reset the board => remove all the pieces
void
reset
(){
for
(
int
i
=
0
;
i
<
8
;
i
++
){
//loop over the ranks
for
(
int
j
=
0
;
j
<
16
;
j
++
){
// loop over the files
int
square
=
16
*
i
+
j
;
// print the board's valid quares
if
(
!
(
square
&
0x88
)){
board
[
square
]
=
e
;
}
}
}
}
// Main
int
main
(){
// moving chess pieces
board
[
e2
]
=
e
;
show_board
();
board
[
e4
]
=
p
;
show_board
();
reset
();
show_board
();
printf
(
"
\n
"
);
return
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