• R/O
  • HTTP
  • SSH
  • HTTPS

learning: Commit


Commit MetaInfo

Revision5fcc68ab278dc177e03712318964d3cd2450acd8 (tree)
Time2018-01-10 08:40:55
Authoryamat0jp <yamat0jp@yaho...>
Commiteryamat0jp

Log Message

hdf5ファイルをアップするのをやめました
隅の周辺にはおかないように仕込みました。

Change Summary

Incremental Difference

--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
1+*.hdf5
\ No newline at end of file
--- a/reversi.py
+++ b/reversi.py
@@ -216,18 +216,27 @@ def hyouka():
216216 i = 0
217217 x = stone_grid.item
218218 corner = [x.grid[0][0],x.grid[0][7],x.grid[7][0],x.grid[7][7]]
219+ n_corner = [x.grid[0][1],x.grid[1][1],x.grid[1][0],
220+ x.grid[0][6],x.grid[1][6],x.grid[1][7],
221+ x.grid[6][0],x.grid[6][1],x.grid[7][1],
222+ x.grid[6][6],x.grid[6][7],x.grid[7][6]]
219223 for y in corner:
220224 if y == black:
221- i += 2
225+ i += 3
222226 elif y == white:
223- i -= 2
227+ i -= 3
228+ for y in n_corner:
229+ if y == black:
230+ i -= 1
231+ if y == white:
232+ i += 1
224233 corner = [(0,0),(0,7),(7,0),(7,7)]
225234 for y in corner:
226235 if stone_grid.CanSetStone(black,y[0],y[1],False) == True:
227- i += 1
236+ i += 2
228237 stone_grid.item.grid[y[0]][y[1]] = none
229238 elif stone_grid.CanSetStone(white,y[0],y[1],False) == True:
230- i -= 1
239+ i -= 2
231240 stone_grid.item.grid[y[0]][y[1]] = none
232241 return i
233242
Show on old repository browser