File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 66class Visualizer :
77 pygame .init ()
88
9- def __init__ (self , size = 600 ):
9+ def __init__ (self , size = 720 ):
1010 self .sorting = False
1111 self .ascending = True
1212 self .bars = 64
1313 self .tick = 64
1414 self .width = size // 2 * 3
1515 self .height = size
1616 self .top_pad = self .height / 4
17- self .font_size = self .height // 20
17+ self .font_size = self .height // 24
1818 self .window = pygame .display .set_mode ((self .width , self .height ))
1919 pygame .display .set_caption ("Sorting Algorithm Visualizer" )
2020 self .setAlgo ()
@@ -71,7 +71,7 @@ def update(self):
7171 1 ,
7272 (255 , 255 , 255 ),
7373 ),
74- (10 , 10 + self .font_size * i ),
74+ (self . width // 3 , 10 + self .font_size * i ),
7575 )
7676
7777 titles2 = [
@@ -91,7 +91,7 @@ def update(self):
9191 1 ,
9292 color ,
9393 ),
94- (self .width // 2 , 10 + self .font_size * i ),
94+ (self .width // 3 * 2 , 10 + self .font_size * i ),
9595 )
9696
9797 algorithms = [
@@ -108,7 +108,7 @@ def update(self):
108108 1 ,
109109 color ,
110110 ),
111- (self . width / 4 * 3 , 10 + self .font_size * i ),
111+ (10 , 10 + self .font_size * i ),
112112 )
113113
114114 self .drawList ()
You can’t perform that action at this time.
0 commit comments