mirror of
https://github.com/aNNiMON/Own-Programming-Language-Tutorial.git
synced 2024-09-20 00:34:20 +03:00
17 lines
251 B
Scala
17 lines
251 B
Scala
use std, canvas
|
|
|
|
w = 800 h = 600
|
|
window("canvas example 2", w, h);
|
|
color(#ffffff)
|
|
frect(0, 0, w, h)
|
|
|
|
step = rand(20)
|
|
color(#0000ff)
|
|
for y = 0, y < h, y += step {
|
|
line(0, y, w, y)
|
|
}
|
|
for x = 0, x < w, x += step {
|
|
line(x, 0, x, h)
|
|
}
|
|
repaint();
|