I have a question about a college job I've been doing. It consists of creating a naval battle game, in PASCAL. I am using the content of this link as a guide to writing the program:
The question is, how do I determine how many positions a particular vessel should occupy on the board?
For example, if I want to establish that a certain vessel occupies 6 positions on the board should I write in this way?
for Conta := 1 to 5 do
begin
repeat
i := random(6);
j := chr(random(9)+65);
until Batalha[i, j] = '0';
Batalha[i, j]:='S';
end;
Does the i := random(6);
command establish that a particular vessel will occupy 6 positions on the board?
Thank you.