From 2fe25e20b8e3eff8587aa970a544264853a266c2 Mon Sep 17 00:00:00 2001 From: tsmith37 Date: Tue, 23 Sep 2025 14:31:54 -0400 Subject: [PATCH] First milestone is done I finished writing the code for the checker board, the tiles on it, and the playing coins. This part was pretty simple i was just making all the shapes i would need for the board game. Something I figured out how to do was fill in color to what I draw. --- __pycache__/shapes.cpython-313.pyc | Bin 0 -> 1668 bytes drawing.py | 12 ++++++++ shapes.py | 43 +++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 __pycache__/shapes.cpython-313.pyc create mode 100644 shapes.py diff --git a/__pycache__/shapes.cpython-313.pyc b/__pycache__/shapes.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c562f6c8a5cbcbb1029d18229fc6858a26869c7a GIT binary patch literal 1668 zcmd6n&ubGw6vt7wf~JsPiqcBMd(eEf57*4ZJXBIb;5o(Z{EyfzMpw)H=9i}9OFN~*7jqJ z?Ne|#Fb+re7QS|v!3_R{-HAzN#HJZ=BaRv~1Zv#SP=%2|)r=%+!qjuA1KOVB0l!}6 zVWmg}zT)_Fmr-`uBL4Ei;RSw{J(^+6;Y&xW4Lx~(l!aV8NY<6(S?elDR$XXfI?%u}Ykn>k z40u*W6>a61el5@_@H|2zWpFoN@DzA?9~wTWxA}SHt@>^~zt$|z<{OUX&*tmkzE)+w zSbtVf`o~;i-`DF-vw#ZK*%Yb3H6)=Fx{IOVWGOC_zY+ zh{y;~!$8=oN=!w_8WmwiEFnYrL{t_=F`xe7`3ffRfIz1_VI|B(RwU-I%@|xD z`FHmd2UXb>FiEGN^8|^q1!ZJCO*5w*=(xIAb}a`kV_M?low^FOCr1C1s}L)8L&2qf zK2ns5j9kO~)jme5dt&S_BMZ4?knkJeBOv-Hh3y-*B}fX13Q)z}=uV>+*6*#km4>bE o1AV`!w>|v!vR`q|d7F)PM1qfWMg$-3WCS1T3?53C{)N5q8#@6am;e9( literal 0 HcmV?d00001 diff --git a/drawing.py b/drawing.py index 29fc89e..ad00854 100644 --- a/drawing.py +++ b/drawing.py @@ -5,3 +5,15 @@ # (Briefly describe what this program does.) from turtle import * +from shapes import board +from shapes import black_tile +from shapes import white_tile +from shapes import red_coin +from shapes import blue_coin + + + +blue_coin(10) + + +input() \ No newline at end of file diff --git a/shapes.py b/shapes.py new file mode 100644 index 0000000..106e6cf --- /dev/null +++ b/shapes.py @@ -0,0 +1,43 @@ +from turtle import * + +def board(side_length): + "Out line of the board" + sides = [side_length, side_length, side_length, side_length] + for sides in sides: + pensize(4) + forward(sides) + right(90) + + +def square(size): + "Draws a square of side length `size`" + for side in range(4): + forward(size) + left(90) + +def black_tile(size): + begin_fill() + fillcolor('black') + square(size) + end_fill() + + +def white_tile(size): + begin_fill() + fillcolor('white') + square(size) + end_fill() + + +def red_coin(size): + begin_fill() + fillcolor('red') + circle(size) + end_fill() + + +def blue_coin(size): + begin_fill() + fillcolor('blue') + circle(size) + end_fill() \ No newline at end of file