first you have to initialize the array.
board : Array [1..10,1..10] of char;
then place the ships
board[2,2]:='A';
board[3,2]:='A';
board[4,2]:='A';
board[5,2]:='A';
board[6,2]:='A';
i would advise to use some simple coding for the ships such as
aircraft carrier code: A
so if aircraft carrier is at
[2,5] to [6,5], you can ask the user to enter two numbers (row, column) and check if
e.g. point [4,5] is assigned to 'A'
this is the coding i used for aircraft carrier, which is pretty much the same for all
while Gcount <> 17 do //5+4+3+3+2
begin
count:= count+1; // to count how many hits were required at the end
writeln('enter row you want to hit');
readln(row);
writeln('enter column you want to hit');
readln(col);
if board [row,col] = 'A' then
begin
Gcount:=Gcount+1;
writeln('you hit AirCraft Carrier');
end
else if board [row,col] = 'B' then
.... and so on....
i did not copy the exact code i used since there is a slight error. you can hit the same spot twice...
but in general to make such a game is not very hard
regards, Gohan (CY)
Please make your question more clear. Qhat do you want to do? Rewrite the programming language Pascal? Convert c++ code to Pascal? Create a Pascal triangle? Make a baby son that's called Pascal? (btw, that last thing has to be done in hardware)
you cant u stupid
hgfhfgh
Using the PyGame module.
Yes you can, however there are better programming languages for this.
Please make your question more clear. Qhat do you want to do? Rewrite the programming language Pascal? Convert c++ code to Pascal? Create a Pascal triangle? Make a baby son that's called Pascal? (btw, that last thing has to be done in hardware)
you cant u stupid
pascal drew a triangle, and then signed his name at the bottom of the page. He was 7 years old
Open flash. Make a game using AS.
You can make your own game using Sploder. A similar service is Game Gonzo.
1891
After the football game i had a huge party.
1642 - 1645
This game was a cakewalk
No, but he was a wizard at math.
(force) divided by (area) That's pressure. 1 pascal = 1 newton per square meter
using your mind