Hey, i have a kind of a problem, i want to program something in qbasic, for a part it's working already (small part), but partly there are some problems
I want to create a kind of an artpiece, originally by Ellsworth Kelly (the "Seine". In this piece of art there is a kind of structure: there are vertical columns for different horizontal values (x-values), kind of like this:
-----------------
| | | | |
| | | | |
| | | | |
-----------------
1 2 3 4 x -->
each column got to have collored blocks, column 1 has 1 block at random y-height, column 2 has 2 blocks at random y-height, column 3 has 3 blocks etc..
This is the code i already made(it's not really much):
CLS
SCREEN 9
WINDOW (-2, -2)-(6, 6)
randomize timer
for x = 0 to 4
for q = 1 to (x + 1)
T = x + 1
y = INT(RND * 5)
LINE (x, y)-((x+1), (y+1)), T, BF
next q
next x
end
as you can see, this is quite simple (even for me), now here is my problem: with this code, basic sets the random blocks, but they can be printed over a block which it's y-value was already used, so what i need to do, is to put the used y-values in an array, so that those will not be picked again, but i don't know how to do that, i tried some things, but it didn't work out right...
Does somebody know how to solve this problem?
Thanx in advance...
I want to create a kind of an artpiece, originally by Ellsworth Kelly (the "Seine". In this piece of art there is a kind of structure: there are vertical columns for different horizontal values (x-values), kind of like this:
-----------------
| | | | |
| | | | |
| | | | |
-----------------
1 2 3 4 x -->
each column got to have collored blocks, column 1 has 1 block at random y-height, column 2 has 2 blocks at random y-height, column 3 has 3 blocks etc..
This is the code i already made(it's not really much):
CLS
SCREEN 9
WINDOW (-2, -2)-(6, 6)
randomize timer
for x = 0 to 4
for q = 1 to (x + 1)
T = x + 1
y = INT(RND * 5)
LINE (x, y)-((x+1), (y+1)), T, BF
next q
next x
end
as you can see, this is quite simple (even for me), now here is my problem: with this code, basic sets the random blocks, but they can be printed over a block which it's y-value was already used, so what i need to do, is to put the used y-values in an array, so that those will not be picked again, but i don't know how to do that, i tried some things, but it didn't work out right...
Does somebody know how to solve this problem?
Thanx in advance...