diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..4a96c22 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +source .venv/bin/activate \ No newline at end of file diff --git a/drawtiles.py b/drawtiles.py index d855f01..31c73e1 100644 --- a/drawtiles.py +++ b/drawtiles.py @@ -11,15 +11,15 @@ from superturtle.movement import no_delay from argparse import ArgumentParser parser = ArgumentParser("python drawtiles.py", description="Draws a grid of tiles.") -parser.add_argument("width", type=int, help="How many tiles across the grid should be") -parser.add_argument("height", type=int, help="How many tiles high the grid should be") -parser.add_argument("size", type=int, help="Side length of each tile") +parser.add_argument("5", type=int, help="How many tiles across the grid should be") +parser.add_argument("10", type=int, help="How many tiles high the grid should be") +parser.add_argument("15", type=int, help="Side length of each tile") parser.add_argument("--fast", action="store_true", help="Skip turtle animation and show the result") args = parser.parse_args() if args.fast: with no_delay(): - draw_tile_grid(args.width, args.height, args.size, draw_tile) + draw_tile_grid(args,5, args,10, args,15, -fast, draw_tile) else: draw_tile_grid(args.width, args.height, args.size, draw_tile) input() diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..6e37ab5 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,18 @@ +# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. + +[[package]] +name = "superturtle" +version = "0.2.0" +description = "Extensions to Python's turtle" +optional = false +python-versions = "<4.0,>=3.9" +groups = ["main"] +files = [ + {file = "superturtle-0.2.0-py3-none-any.whl", hash = "sha256:ca3a31be3259387b4490846adbf64502acc9d23472912cc43497ab170e89f506"}, + {file = "superturtle-0.2.0.tar.gz", hash = "sha256:807fb419c1dba9cb809a22a68e72c0193bdeed4a9326eb36ad940b2a7ff6ac04"}, +] + +[metadata] +lock-version = "2.1" +python-versions = ">=3.10,<4.0" +content-hash = "6aad436bbbf760fa856344262eab22d62a167cac4e5dfefbf4be77d5a37428c9" diff --git a/square.py b/square.py index f1fb2a2..93a4cca 100644 --- a/square.py +++ b/square.py @@ -1,17 +1,15 @@ from turtle import * def square(side_length): - forward(side_length) - right(90) - forward(side_length) - right(90) - forward(side_length) - right(90) - forward(side_length) - right(90) + for i in range(4): + forward(side_length) + right(90) sizes = [20, 40, 60, 80, 100] for size in sizes: - square(size) -input() + square(20) + penup() + forward(40) + pendown() +input() \ No newline at end of file