Skip to content

Commit

Permalink
Merged with Upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
the-cybersapien committed Apr 19, 2017
1 parent abfb4fe commit b991c0f
Show file tree
Hide file tree
Showing 32 changed files with 5 additions and 7 deletions.
Binary file removed Training_Data/Back/move/0.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/1.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/10.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/11.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/12.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/13.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/14.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/15.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/16.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/17.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/18.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/19.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/2.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/20.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/21.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/22.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/23.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/24.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/25.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/26.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/27.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/28.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/3.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/4.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/5.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/6.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/7.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/8.bmp
Binary file not shown.
Binary file removed Training_Data/Back/move/9.bmp
Binary file not shown.
1 change: 0 additions & 1 deletion back_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def load(self):
self._load(pt + '/end', end)
self._load(pt + '/intro', intro)
self._load(pt + '/loading', loading)
self._load(pt + '/move', move)
self._load(pt + '/scoreboard', scoreboard)
self._load(pt + '/shop', shop)

Expand Down
10 changes: 5 additions & 5 deletions move_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,19 @@ def evaluate_board(self, start, end, board):
def check_direction(self, start, dir):
end = (start[0] + dir[0], start[1] + dir[1])
board = dc(self.game_board)
if start[0] < 0 or start[0] > self.board_size or end[0] < 0 or end[0] > self.board_size \
or start[1] < 0 or start[1] > self.board_size or end[1] < 0 or end[1] > self.board_size:
return -1, [], None
if start[0] < 0 or start[0] > self.board_size or end[0] <= 0 or end[0] >= self.board_size - 1 \
or start[1] < 0 or start[1] > self.board_size or end[1] <= 0 or end[1] >= self.board_size - 1:
return -1, []

# swap
board[start[0]][start[1]], board[end[0]][end[1]] = board[end[0]][end[1]], board[start[0]][start[1]]
score_start, start_board = self.evaluate_board(start, end, board)
score_end, end_board = self.evaluate_board(end, start, board)

if score_start > score_end:
return score_start, [start, end], start_board
return score_start, [start, end]
else:
return score_end, [end, start], end_board
return score_end, [end, start]

# main function to start solving the board

Expand Down
1 change: 0 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def print_board(board):
end = 101
intro = 102
loading = 103
move = 104
scoreboard = 105
shop = 106

Expand Down

0 comments on commit b991c0f

Please sign in to comment.