From 91f987df097c49cd5b14b2249f8501a64d0a5b67 Mon Sep 17 00:00:00 2001 From: Mat Date: Tue, 15 Nov 2022 14:34:14 +0100 Subject: [PATCH] first commit --- chess_com.py | 19 +++++++++++++++++++ move_ and_piece_of_chess.py | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 chess_com.py create mode 100644 move_ and_piece_of_chess.py diff --git a/chess_com.py b/chess_com.py new file mode 100644 index 0000000..766caf8 --- /dev/null +++ b/chess_com.py @@ -0,0 +1,19 @@ +#task make a chess game + +import numpy as np + +piece = {'Pawn' : 1,'Knigt' : 2,'Bishop' : 3,'Rook' : 5, 'Quenn' : 9,'King' : 10} #assign a value at every piece + +def chess_board_empty(): #affiche le plateau d'echec sous forme de matrice 8*8 vide + board_empty = np.zeros((8,8)) + return board_empty + +print(chess_board_empty()) + +def chess_board(): + board_empty = chess_board_empty() + n = range(len(board_empty)) + m = range(len(board_empty[0])) + for i in n: + for j in m: + pass diff --git a/move_ and_piece_of_chess.py b/move_ and_piece_of_chess.py new file mode 100644 index 0000000..5dc9b89 --- /dev/null +++ b/move_ and_piece_of_chess.py @@ -0,0 +1,6 @@ +Pawn = 1 +Knigt = 2 +Bishop = 3 +Rook = 5 +Quenn = 9 +King = 10