- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
class Cell:
def __init__(self, row_id, column_id):
"""Описание ячейки в матрице"""
"""Определение первой буквы в ячейке"""
if row_id == 0:
self.cell_letter_1 = 'A'
elif row_id == 1:
self.cell_letter_1 = 'K'
elif row_id == 2:
self.cell_letter_1 = 'Q'
elif row_id == 3:
self.cell_letter_1 = 'J'
elif row_id == 4:
self.cell_letter_1 = 'T'
elif row_id == 5:
self.cell_letter_1 = '9'
elif row_id == 6:
self.cell_letter_1 = '8'
elif row_id == 7:
self.cell_letter_1 = '7'
elif row_id == 8:
self.cell_letter_1 = '6'
elif row_id == 9:
self.cell_letter_1 = '5'
elif row_id == 10:
self.cell_letter_1 = '4'
elif row_id == 11:
self.cell_letter_1 = '3'
elif row_id == 12:
self.cell_letter_1 = '2'
"""Определение второй буквы в ячейке"""
if column_id == 0:
self.cell_letter_2 = 'A'
elif column_id == 1:
self.cell_letter_2 = 'K'
elif column_id == 2:
self.cell_letter_2 = 'Q'
elif column_id == 3:
self.cell_letter_2 = 'J'
elif column_id == 4:
self.cell_letter_2 = 'T'
elif column_id == 5:
self.cell_letter_2 = '9'
elif column_id == 6:
self.cell_letter_2 = '8'
elif column_id == 7:
self.cell_letter_2 = '7'
elif column_id == 8:
self.cell_letter_2 = '6'
elif column_id == 9:
self.cell_letter_2 = '5'
elif column_id == 10:
self.cell_letter_2 = '4'
elif column_id == 11:
self.cell_letter_2 = '3'
elif column_id == 12:
self.cell_letter_2 = '2'
"""Установка порядка отойбражения 1-й и 2-й буквы в ячейке"""
if row_id == 0:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 1 and column_id >= 2:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 2 and column_id >= 3:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 3 and column_id >= 4:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 4 and column_id >= 5:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 5 and column_id >= 6:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 6 and column_id >= 7:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 7 and column_id >= 8:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 8 and column_id >= 9:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 9 and column_id >= 10:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 10 and column_id >= 11:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
elif row_id == 11 and column_id == 12:
self.cell_text = self.cell_letter_1 + self.cell_letter_2
else:
self.cell_text = self.cell_letter_2 + self.cell_letter_1
ProgRamistYshka 20.07.2017 17:34 # 0