Clean up and add TODOs
parent
1a4b7a730a
commit
df3d6a2deb
|
@ -11,6 +11,7 @@ if __name__ == "__main__":
|
|||
else:
|
||||
test_dir = './gameplay/test_board.txt'
|
||||
|
||||
|
||||
class SudokuSystem:
|
||||
|
||||
def __init__(self):
|
||||
|
@ -117,3 +118,11 @@ class SudokuSystem:
|
|||
|
||||
for r, c in zip(row, col):
|
||||
self.cell_status[r, c] = EMPTY
|
||||
|
||||
def generate_random_board(self):
|
||||
# TODO: Write function to generate a random board
|
||||
pass
|
||||
|
||||
def check_valid_moves(self):
|
||||
# TODO: Write function to return a possible valid numbers for a cell
|
||||
pass
|
||||
|
|
|
@ -70,3 +70,9 @@ class GameBoard(BoxBoard):
|
|||
val = 0
|
||||
self.gamegrid.replace_cell_number(int(val))
|
||||
self.show_number_ring()
|
||||
|
||||
|
||||
class MenuBoard(BoxBoard):
|
||||
# TODO: Create the components for the menu: A timer and a difficulty selector
|
||||
def __init__(self, width, height, parent=None):
|
||||
super().__init__(width, height, parent)
|
||||
|
|
|
@ -11,6 +11,8 @@ import numpy as np
|
|||
|
||||
|
||||
class NumberPainter(QGraphicsItem):
|
||||
# TODO: Use different font to differentiate the status of a cell
|
||||
|
||||
def __init__(self, parent, grid):
|
||||
super().__init__(parent=parent)
|
||||
self.parent = parent
|
||||
|
@ -48,7 +50,8 @@ class NumberPainter(QGraphicsItem):
|
|||
|
||||
|
||||
class SudokuGrid(QGraphicsObject):
|
||||
# Prepare the signal
|
||||
# TODO: Add functions to animated the grid lines
|
||||
|
||||
buttonClicked = pyqtSignal(float, float)
|
||||
|
||||
def __init__(self, width, height, parent=None):
|
||||
|
@ -64,9 +67,6 @@ class SudokuGrid(QGraphicsObject):
|
|||
self.thick_unit = 5
|
||||
self.thick_pen.setWidth(self.thick_unit)
|
||||
|
||||
self.horiz_gridlines = []
|
||||
self.vert_gridlines = []
|
||||
|
||||
self.thinlines = []
|
||||
self.thicklines = []
|
||||
|
||||
|
@ -120,6 +120,8 @@ class SudokuGrid(QGraphicsObject):
|
|||
painter.setPen(self.selection_pen)
|
||||
painter.drawRect(self.selection_box)
|
||||
|
||||
# TODO: Possibly draw the fixed cell here
|
||||
|
||||
def hoverMoveEvent(self, event):
|
||||
box_w = bound_value(0, int(event.pos().x()/self.cell_width), 8)
|
||||
box_h = bound_value(0, int(event.pos().y() / self.cell_height), 8)
|
||||
|
@ -139,6 +141,9 @@ class SudokuGrid(QGraphicsObject):
|
|||
|
||||
|
||||
class NumberRing(QGraphicsItem):
|
||||
# TODO: Add functions to animated the ring appearing
|
||||
# TODO: Adjust the positioning of each element
|
||||
# TODO: Make it transparent when mouse is out of range
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent=parent)
|
||||
|
|
Loading…
Reference in New Issue