Created
May 26, 2024 06:06
-
-
Save nogajun/981b2d7e597c4cd220a0eaaf40fdfd1e to your computer and use it in GitHub Desktop.
ported from MSX Graphic workbook(1984) p.69 List 1a / MSXグラフィック・ワークブックからのPython移植
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ported from MSX Graphic workbook(1984) p.69 List 1a | |
import pyxel | |
size = 255 | |
count = 36 | |
step = size / count | |
color = pyxel.COLOR_WHITE | |
pyxel.init(size, size) | |
pyxel.cls(pyxel.COLOR_PURPLE) | |
for i in range(count): | |
pyxel.line(step*i, size, size, size-step*i, color) | |
pyxel.line(size-step*i, 0, size, size-step*i, color) | |
pyxel.line(size-step*i, 0, 0, step*i, color) | |
pyxel.line(step*i, size, 0, step*i, color) | |
pyxel.flip() | |
pyxel.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment