Skip to content

Commit 9c4de06

Browse files
committed
The initial setup of the game is complete; NO FUNCTIONALITY CURRENTlY
1 parent e8ad4ea commit 9c4de06

File tree

4 files changed

+120
-107
lines changed

4 files changed

+120
-107
lines changed

Pictures/black_pawn.png

1.58 KB
Loading

pieces.kv

Lines changed: 0 additions & 78 deletions
This file was deleted.

pieces.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

window.kv

Lines changed: 120 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
# File name: Board.py
2+
#######################################################################################################
3+
#The Code is long, repetative and stringy but this is better than implementing it in python,
4+
#and the the best of my knowledge you have to keep each window in one file (multiple .kv files is okay)
5+
#######################################################################################################
6+
7+
28

39
<board_setup>
410
id: board_setup
511
canvas.before:
12+
#Makes a rectangle around the window, and fills that with the .PNG of the Chessbaord
613
Rectangle:
714
pos: self.pos
815
size: self.size
916
source: 'Pictures\chessboard.png'
1017
FloatLayout:
11-
18+
#Size of each is 1/8 the total x and y value of the window
1219
size_hint: .125, .125
1320

21+
####Creates all of the White Pieces
1422
Button:
1523
id: "Left White Rook"
1624
pos_hint: {"right": 1, 'y': 0}
@@ -59,52 +67,154 @@
5967
background_normal: 'Pictures\White_Queen.png'
6068
background_down: 'Pictures\White_Queen.png'
6169

62-
#ALL OF THE WHITE PAWNS:
70+
###Creates all of the White Pawns
6371

6472
Button:
65-
id: "Pawn1"
73+
id: "White Pawn1"
6674
pos_hint: {"right": 1, 'y': 1}
6775
background_down: 'Pictures\white_pawn.png'
6876
background_normal: 'Pictures\white_pawn.png'
6977

7078
Button:
71-
id: "Pawn2"
79+
id: "White Pawn2"
7280
pos_hint: {"right": 2, 'y': 1}
7381
background_down: 'Pictures\white_pawn.png'
7482
background_normal: 'Pictures\white_pawn.png'
7583

7684
Button:
77-
id: "Pawn3"
85+
id: "White Pawn3"
7886
pos_hint: {"right": 3, 'y': 1}
7987
background_down: 'Pictures\white_pawn.png'
8088
background_normal: 'Pictures\white_pawn.png'
8189

8290
Button:
83-
id: "Pawn4"
91+
id: "White Pawn4"
8492
pos_hint: {"right": 4, 'y': 1}
8593
background_down: 'Pictures\white_pawn.png'
8694
background_normal: 'Pictures\white_pawn.png'
8795

8896
Button:
89-
id: "Pawn5"
97+
id: "White Pawn5"
9098
pos_hint: {"right": 5, 'y': 1}
9199
background_down: 'Pictures\white_pawn.png'
92100
background_normal: 'Pictures\white_pawn.png'
93101

94102
Button:
95-
id: "Pawn6"
103+
id: "White Pawn6"
96104
pos_hint: {"right": 6, 'y': 1}
97105
background_down: 'Pictures\white_pawn.png'
98106
background_normal: 'Pictures\white_pawn.png'
99107

100108
Button:
101-
id: "Pawn7"
109+
id: "White Pawn7"
102110
pos_hint: {"right": 7, 'y': 1}
103111
background_down: 'Pictures\white_pawn.png'
104112
background_normal: 'Pictures\white_pawn.png'
105113

106114
Button:
107-
id: "Pawn8"
115+
id: "White Pawn8"
108116
pos_hint: {"right": 8, 'y': 1}
109117
background_down: 'Pictures\white_pawn.png'
110118
background_normal: 'Pictures\white_pawn.png'
119+
120+
#######################################
121+
########MOVED ONTO BLACK PIECES########
122+
######################################
123+
124+
Button:
125+
id: "Left Black Rook"
126+
pos_hint: {"right": 1, 'y': 7}
127+
background_normal: 'Pictures/black_rook.png'
128+
background_down: 'Pictures/black_rook.png'
129+
130+
Button:
131+
id: "Right Black Rook"
132+
pos_hint: {"right": 8, 'y': 7}
133+
background_normal: 'Pictures/black_rook.png'
134+
background_down: 'Pictures/black_rook.png'
135+
136+
Button:
137+
id: "Left Black Knight"
138+
pos_hint: {"right": 2, 'y': 7}
139+
background_normal: 'Pictures/black_horse.png'
140+
background_down: 'Pictures/black_horse.png'
141+
142+
Button:
143+
id: "Right Black Knight"
144+
pos_hint: {"right": 7, 'y': 7}
145+
background_normal: 'Pictures/black_horse.png'
146+
background_down: 'Pictures/black_horse.png'
147+
148+
Button:
149+
id: "Left Black Bishop"
150+
pos_hint: {"right": 3, 'y': 7}
151+
background_normal: 'Pictures/black_Bishop.png'
152+
background_down: 'Pictures/black_Bishop.png'
153+
154+
Button:
155+
id: "Right Black Bishop"
156+
pos_hint: {"right": 6, 'y': 7}
157+
background_normal: 'Pictures/black_Bishop.png'
158+
background_down: 'Pictures/black_Bishop.png'
159+
160+
Button:
161+
id: "Black King"
162+
pos_hint: {"right": 5, 'y': 7}
163+
background_normal: 'Pictures/black_king.png'
164+
background_down: 'Pictures/black_king.png'
165+
166+
Button:
167+
id: "Black Queen"
168+
pos_hint: {"right": 4, 'y': 7}
169+
background_normal: 'Pictures/black_Queen.png'
170+
background_down: 'Pictures/black_Queen.png'
171+
172+
###Creates all of the Black Pawns
173+
174+
Button:
175+
id: "Black Pawn1"
176+
pos_hint: {"right": 1, 'y': 6}
177+
background_down: 'Pictures/black_pawn.png'
178+
background_normal: 'Pictures/black_pawn.png'
179+
180+
Button:
181+
id: "Black Pawn2"
182+
pos_hint: {"right": 2, 'y': 6}
183+
background_down: 'Pictures/black_pawn.png'
184+
background_normal: 'Pictures/black_pawn.png'
185+
186+
Button:
187+
id: "Black Pawn3"
188+
pos_hint: {"right": 3, 'y': 6}
189+
background_down: 'Pictures/black_pawn.png'
190+
background_normal: 'Pictures/black_pawn.png'
191+
192+
Button:
193+
id: "Black Pawn4"
194+
pos_hint: {"right": 4, 'y': 6}
195+
background_down: 'Pictures/black_pawn.png'
196+
background_normal: 'Pictures/black_pawn.png'
197+
198+
Button:
199+
id: "Black Pawn5"
200+
pos_hint: {"right": 5, 'y': 6}
201+
background_down: 'Pictures/black_pawn.png'
202+
background_normal: 'Pictures/black_pawn.png'
203+
204+
Button:
205+
id: "Black Pawn6"
206+
pos_hint: {"right": 6, 'y': 6}
207+
background_down: 'Pictures/black_pawn.png'
208+
background_normal: 'Pictures/black_pawn.png'
209+
210+
Button:
211+
id: "Black Pawn7"
212+
pos_hint: {"right": 7, 'y': 6}
213+
background_down: 'Pictures/black_pawn.png'
214+
background_normal: 'Pictures/black_pawn.png'
215+
216+
Button:
217+
id: "Black Pawn8"
218+
pos_hint: {"right": 8, 'y': 6}
219+
background_down: 'Pictures/black_pawn.png'
220+
background_normal: 'Pictures/black_pawn.png'

0 commit comments

Comments
 (0)