how can I use array to draw a crossword puzzle table

[b][red]This message was edited by yrone at 2004-12-3 10:58:59[/red][/b][hr]
[b][red]This message was edited by yrone at 2004-12-3 10:58:20[/red][/b][hr]
sorry that i want to ask how can i draw the following picture using pascal with the array

given that the puzzle is 5*5

xxxxx
xxxxx
xxxxx
xxxxx
xxxxx

how can i use array to draw the table so that i can ask player to enter the coordinate( eg: location[2,2]:=a ) and 'a' will replace in the coordinate

xxxxx
xaxxx
xxxxx
xxxxx
xxxxx


thanks


Comments

  • : [b][red]This message was edited by yrone at 2004-12-3 10:58:59[/red][/b][hr]
    : [b][red]This message was edited by yrone at 2004-12-3 10:58:20[/red][/b][hr]
    : sorry that i want to ask how can i draw the following picture using pascal with the array
    :
    : given that the puzzle is 5*5
    :
    : xxxxx
    : xxxxx
    : xxxxx
    : xxxxx
    : xxxxx
    :
    : how can i use array to draw the table so that i can ask player to enter the coordinate( eg: location[2,2]:=a ) and 'a' will replace in the coordinate
    :
    : xxxxx
    : xaxxx
    : xxxxx
    : xxxxx
    : xxxxx
    :
    :
    : thanks
    :
    :
    :
    Here is a simple code to draw an array. GotoXY() is detailed in the help files. For more complex codes, look to older posts about crossword puzzles.
    [code]
    for x := 1 to ArrayX do
    for y := 1 to ArrayY do
    begin
    GotoXY(x, y);
    write(Array[x, y]);
    end;
    [/code]
  • : : [b][red]This message was edited by yrone at 2004-12-3 10:58:59[/red][/b][hr]
    : : [b][red]This message was edited by yrone at 2004-12-3 10:58:20[/red][/b][hr]
    : : sorry that i want to ask how can i draw the following picture using pascal with the array
    : :
    : : given that the puzzle is 5*5
    : :
    : : xxxxx
    : : xxxxx
    : : xxxxx
    : : xxxxx
    : : xxxxx
    : :
    : : how can i use array to draw the table so that i can ask player to enter the coordinate( eg: location[2,2]:=a ) and 'a' will replace in the coordinate
    : :
    : : xxxxx
    : : xaxxx
    : : xxxxx
    : : xxxxx
    : : xxxxx
    : :
    : :
    : : thanks
    : :
    : :
    : :
    : Here is a simple code to draw an array. GotoXY() is detailed in the help files. For more complex codes, look to older posts about crossword puzzles.
    : [code]
    : for x := 1 to ArrayX do
    : for y := 1 to ArrayY do
    : begin
    : GotoXY(x, y);
    : write(Array[x, y]);
    : end;
    : [/code]
    :
    thank you very much>"<
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories