From fb491d8f96d1fe92d1d936ac4fc9cd454dc75b6d Mon Sep 17 00:00:00 2001 From: Mat Date: Tue, 15 Nov 2022 14:34:42 +0100 Subject: [PATCH] . --- chess_com.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/chess_com.py b/chess_com.py index 766caf8..9e20d65 100644 --- a/chess_com.py +++ b/chess_com.py @@ -1,8 +1,20 @@ #task make a chess game +'''to know : +value of a pwan : 1 +value of a knight : 2 +value of a bishop : 3 +value of a rook : 5 +value of the Quenn : 9 +value of the King : 10 ''' + +piece = [(1,2,3,5,9,10)] + + 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)) @@ -16,4 +28,13 @@ def chess_board(): m = range(len(board_empty[0])) for i in n: for j in m: - pass + if i == 0: + board_empty[j] = piece[j] + if i == 1: + while j