Sie sind vermutlich noch nicht im Forum angemeldet - Klicken Sie hier um sich kostenlos anzumelden Impressum 
Sie können sich hier anmelden
Dieses Thema hat 0 Antworten
und wurde 146 mal aufgerufen
 More languages
Raman Offline




Beiträge: 167

06.06.2021 12:01
Curious trial - Scrabble with chess moves Zitat · Antworten

Weird desire - Scrabble with chess moves

1 point: a ×4, b ×4, c ×4, d ×4, e ×4, f ×4, g ×4, h ×4, 1 ×4, 2 ×4, 3 ×4, 4 ×4, 5 ×4, 6 ×4, 7 ×4, 8 ×4
2 points: K ×5, Q ×5, R ×5, B ×5, N ×5
3 points: x ×7
4 points: + ×3
5 points: # ×1

For a bizarre attempt of Scrabble with chess moves, 7 tiles in each of player's racks is optimal as in conventional English Scrabble. The chess dictionary contains 29274 different chess moves, which is a little more than 28946 in the version 1.0.4 of the Maths dictionary that had been prepared by Jouni Tolonen.

move.py

1
2
3
4
5
6
7
8
9
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
 
print '[Header]'
print 'Version=100000'
print 'Author=Raman Viswanathan <raman22feb1988@gmail.com>'
print 'StandardCategory=Chess moves'
print 'Licence=GNU General Public License, v3'
print 'Release=05.06.21'
print 'Comment=Scrabble with chess moves'
print 'Letters=K,Q,R,9,N,a,b,c,d,e,f,g,h,1,2,3,4,5,6,7,8,x,+,#,0,-'
print 'Values=2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,4,5,8,10'
print 'Counts=5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,3,1,0,0'
print 'Key='
print '[Replace]'
print '9=B'
print '-=\xe2\x88\x92'
print '[Categories]'
print '[Words]'
pieces = ['K', 'Q', 'R', '9', 'N']
files = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
ranks = ['1', '2', '3', '4', '5', '6', '7', '8']
print '0-0='
print '0-0+='
print '0-0#='
print '0-0-0='
print '0-0-0+='
print '0-0-0#='
for file in files:
for rank in ranks:
if int(rank) >= 2 and int(rank) <= 7:
print file + rank + '='
print file + rank + '+='
print file + rank + '#='
else:
for piece in pieces[1:]:
print file + rank + piece + '='
print file + rank + piece + '+='
print file + rank + piece + '#='
for i in range(7):
for rank in ranks:
if int(rank) >= 2 and int(rank) <= 7:
print files[i] + 'x' + files[i + 1] + rank + '='
print files[i] + 'x' + files[i + 1] + rank + '+='
print files[i] + 'x' + files[i + 1] + rank + '#='
print files[i + 1] + 'x' + files[i] + rank + '='
print files[i + 1] + 'x' + files[i] + rank + '+='
print files[i + 1] + 'x' + files[i] + rank + '#='
else:
for piece in pieces[1:]:
print files[i] + 'x' + files[i + 1] + rank + piece + '='
print files[i] + 'x' + files[i + 1] + rank + piece + '+='
print files[i] + 'x' + files[i + 1] + rank + piece + '#='
print files[i + 1] + 'x' + files[i] + rank + piece + '='
print files[i + 1] + 'x' + files[i] + rank + piece + '+='
print files[i + 1] + 'x' + files[i] + rank + piece + '#='
for piece in pieces:
for file in files:
for rank in ranks:
print piece + file + rank + '='
print piece + 'x' + file + rank + '='
print piece + file + rank + '+='
print piece + 'x' + file + rank + '+='
print piece + file + rank + '#='
print piece + 'x' + file + rank + '#='
for column in range(8):
for file in range(8):
for rank in range(8):
print 'Q' + files[column] + files[file] + ranks[rank] + '='
print 'Q' + files[column] + 'x' + files[file] + ranks[rank] + '='
print 'Q' + files[column] + files[file] + ranks[rank] + '+='
print 'Q' + files[column] + 'x' + files[file] + ranks[rank] + '+='
print 'Q' + files[column] + files[file] + ranks[rank] + '#='
print 'Q' + files[column] + 'x' + files[file] + ranks[rank] + '#='
for column in range(8):
for file in range(8):
for rank in range(8):
print 'R' + files[column] + files[file] + ranks[rank] + '='
print 'R' + files[column] + 'x' + files[file] + ranks[rank] + '='
print 'R' + files[column] + files[file] + ranks[rank] + '+='
print 'R' + files[column] + 'x' + files[file] + ranks[rank] + '+='
print 'R' + files[column] + files[file] + ranks[rank] + '#='
print 'R' + files[column] + 'x' + files[file] + ranks[rank] + '#='
for column in range(8):
for file in range(8):
for rank in range(8):
if column == file:
continue
if (file == 0 or file == 7) and (rank == 0 or rank == 7):
continue
if (rank + abs(column - file) > 7) and (rank - abs(column - file) < 0):
continue
print '9' + files[column] + files[file] + ranks[rank] + '='
print '9' + files[column] + 'x' + files[file] + ranks[rank] + '='
print '9' + files[column] + files[file] + ranks[rank] + '+='
print '9' + files[column] + 'x' + files[file] + ranks[rank] + '+='
print '9' + files[column] + files[file] + ranks[rank] + '#='
print '9' + files[column] + 'x' + files[file] + ranks[rank] + '#='
for column in range(8):
for file in range(8):
for rank in range(8):
if column == file or abs(column - file) > 2:
continue
print 'N' + files[column] + files[file] + ranks[rank] + '='
print 'N' + files[column] + 'x' + files[file] + ranks[rank] + '='
print 'N' + files[column] + files[file] + ranks[rank] + '+='
print 'N' + files[column] + 'x' + files[file] + ranks[rank] + '+='
print 'N' + files[column] + files[file] + ranks[rank] + '#='
print 'N' + files[column] + 'x' + files[file] + ranks[rank] + '#='
for row in range(8):
for file in range(8):
for rank in range(8):
if (rank == 0 or rank == 7) and ((file + abs(rank - row) > 7) and (file - abs(rank - row) < 0)):
continue
print 'Q' + ranks[row] + files[file] + ranks[rank] + '='
print 'Q' + ranks[row] + 'x' + files[file] + ranks[rank] + '='
print 'Q' + ranks[row] + files[file] + ranks[rank] + '+='
print 'Q' + ranks[row] + 'x' + files[file] + ranks[rank] + '+='
print 'Q' + ranks[row] + files[file] + ranks[rank] + '#='
print 'Q' + ranks[row] + 'x' + files[file] + ranks[rank] + '#='
for row in range(8):
for file in range(8):
for rank in range(8):
if rank == 0 or rank == 7:
continue
if row == rank:
continue
print 'R' + ranks[row] + files[file] + ranks[rank] + '='
print 'R' + ranks[row] + 'x' + files[file] + ranks[rank] + '='
print 'R' + ranks[row] + files[file] + ranks[rank] + '+='
print 'R' + ranks[row] + 'x' + files[file] + ranks[rank] + '+='
print 'R' + ranks[row] + files[file] + ranks[rank] + '#='
print 'R' + ranks[row] + 'x' + files[file] + ranks[rank] + '#='
for row in range(8):
for file in range(8):
for rank in range(8):
if row == rank:
continue
if (file + abs(rank - row) > 7) and (file - abs(rank - row) < 0):
continue
if (rank > row) and (2 * rank - row > 7):
continue
if (rank < row) and (2 * rank - row < 0):
continue
print '9' + ranks[row] + files[file] + ranks[rank] + '='
print '9' + ranks[row] + 'x' + files[file] + ranks[rank] + '='
print '9' + ranks[row] + files[file] + ranks[rank] + '+='
print '9' + ranks[row] + 'x' + files[file] + ranks[rank] + '+='
print '9' + ranks[row] + files[file] + ranks[rank] + '#='
print '9' + ranks[row] + 'x' + files[file] + ranks[rank] + '#='
for row in range(8):
for file in range(8):
for rank in range(8):
if row == rank or abs(rank - row) > 2:
continue
if rank == 0 or rank == 7:
continue
if (rank == 1 or rank == 6) and abs(rank - row) > 1:
continue
print 'N' + ranks[row] + files[file] + ranks[rank] + '='
print 'N' + ranks[row] + 'x' + files[file] + ranks[rank] + '='
print 'N' + ranks[row] + files[file] + ranks[rank] + '+='
print 'N' + ranks[row] + 'x' + files[file] + ranks[rank] + '+='
print 'N' + ranks[row] + files[file] + ranks[rank] + '#='
print 'N' + ranks[row] + 'x' + files[file] + ranks[rank] + '#='
for column in range(8):
for row in range(8):
for file in range(8):
for rank in range(8):
if column != file and row != rank and abs(file - column) != abs(rank - row):
continue
if column == file and row == rank:
continue
if row == rank:
if file == 0 or file == 7:
continue
if (rank + abs(column - file) > 7) and (rank - abs(column - file) < 0):
continue
if column == file:
if rank == 0 or rank == 7:
continue
if (file + abs(row - rank) > 7) and (file - abs(row - rank) < 0):
continue
print 'Q' + files[column] + ranks[row] + files[file] + ranks[rank] + '='
print 'Q' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '='
print 'Q' + files[column] + ranks[row] + files[file] + ranks[rank] + '+='
print 'Q' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '+='
print 'Q' + files[column] + ranks[row] + files[file] + ranks[rank] + '#='
print 'Q' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '#='
for column in range(8):
for row in range(8):
for file in range(8):
for rank in range(8):
if column == file or row == rank:
continue
if abs(file - column) != abs(rank - row):
continue
if (rank > row) and (2 * rank - row > 7):
continue
if (rank < row) and (2 * rank - row < 0):
continue
if (file > column) and (2 * file - column > 7):
continue
if (file < column) and (2 * file - column < 0):
continue
print '9' + files[column] + ranks[row] + files[file] + ranks[rank] + '='
print '9' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '='
print '9' + files[column] + ranks[row] + files[file] + ranks[rank] + '+='
print '9' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '+='
print '9' + files[column] + ranks[row] + files[file] + ranks[rank] + '#='
print '9' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '#='
for column in range(8):
for row in range(8):
for file in range(8):
for rank in range(8):
if column == file or row == rank:
continue
if abs(file - column) > 2 or abs(rank - row) > 2 or abs(file - column) == abs(rank - row):
continue
if (rank > row) and (2 * rank - row > 7):
continue
if (rank < row) and (2 * rank - row < 0):
continue
if (file > column) and (2 * file - column > 7):
continue
if (file < column) and (2 * file - column < 0):
continue
print 'N' + files[column] + ranks[row] + files[file] + ranks[rank] + '='
print 'N' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '='
print 'N' + files[column] + ranks[row] + files[file] + ranks[rank] + '+='
print 'N' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '+='
print 'N' + files[column] + ranks[row] + files[file] + ranks[rank] + '#='
print 'N' + files[column] + ranks[row] + 'x' + files[file] + ranks[rank] + '#='
 

 Sprung  
Xobor Forum Software von Xobor.de
Einfach ein Forum erstellen
Datenschutz