How to Draw a Chessboard in LOGO?

in #busy7 years ago

@turtlegraphics aims to provide a set of simple-to-follow-and-fun-to-learn examples for Logo Programming, which is known as Turtle Graphics for both parents and kids!.

Logo Programming Source

TO FK :B
  HT # hide the turtle
  IF :B>15 [STOP]
  REPEAT 4 [FD :B RT 90]
  FK :B+1 # draw a bigger square to fill
END

TO QP :Y
  IF :Y>4 [STOP]
  REPEAT 4 [FK 15 FD 15 FK 1 FD 15]
  RT 90 FD 30 RT 90
  REPEAT 4 [FK 15 FD 15 FK 1 FD 15]
  RT 180
  QP :Y+1
END

QP 1

Procedure FK draws a solid square by recursively drawing a smaller square in it. The Chessboard is then drawn by recursively drawing interleaving squares.

Screenshot

image.png

Logo Software

https://chrome.google.com/webstore/detail/logo-turtle/dcoeaobaokbccdcnadncifmconllpihp

If you like this idea and update...

@turtlegraphics and the LogoTurtle is maintained by @justyy

Support him and his work as a witness by

  1. voting him here, or
  2. voting him as a proxy

Some of his contributions: SteemIt Tools, Bots, APIs and Tutorial Thank you!

Sort:  

Me gusta mucho el ajedrez y un entusiasta de la programación. Se conjugan muy bien. Ahora estoy aprendiendo Pyton en un futuro haré proyectos de ajedrez. Saludos @turtlegraphics

Coin Marketplace

STEEM 0.22
TRX 0.20
JST 0.034
BTC 98504.77
ETH 3362.26
USDT 1.00
SBD 3.06