Skip to content

Commit db93fcd

Browse files
committed
Used integer division instead of math lib
1 parent b9e3995 commit db93fcd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

solver.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import numpy as np
2-
import math
3-
import time
42

53
def solve(board):
64

@@ -26,8 +24,8 @@ def solve(board):
2624
# initialization of variables
2725
pRow = coords[kTile , 0]
2826
qCol = coords[kTile , 1]
29-
quad = [math.floor(pRow/3) * 3,
30-
math.floor(qCol/3) * 3] # 3-by-3 square location
27+
quad = [(pRow // 3) * 3,
28+
(qCol // 3) * 3] # 3-by-3 square location
3129

3230
# resetting of discarded value when it's any but the last tile
3331
if kTile != emptyTiles - 1:

0 commit comments

Comments
 (0)