![]() ![]() ![]() Put_Line ( Message ) end if for I in M ' Range loop Ada. Y_Size East : constant X_Range := 2 South : constant Y_Range := 1 X_Start : constant X_Range := 3 - start at the upper left Y_Start : constant Y_Range := 1 X_Finish : constant X_Range := X_Size - East - go to the lower right Y_Finish : constant Y_Range := Y_Size type Maze_Type is array ( Y_Range ) of String ( X_Range ) function Solved ( X : X_Range Y : Y_Range ) return Boolean is begin return ( X = X_Finish ) and ( Y = Y_Finish ) end Solved procedure Output_Maze ( M : Maze_Type Message : String := "" ) is begin if Message /= "" then Ada. X_Size subtype Y_Range is Natural range 1. With Ada.Text_IO procedure Maze_Solver is X_Size : constant Natural := 45 Y_Size : constant Natural := 17 subtype X_Range is Natural range 1. IF dir=TOP AND y>2 AND Locate(x,y-1)=WAY THENĮLSEIF dir=RIGHT AND x2 AND Locate(x-1,y)=WAY THEN WHILE nCount>0 FUNC IsConnection(BYTE x,y,dir) PROC DrawConnection(BYTE POINTER x,y BYTE dir) PROC GetNeighbors(BYTE x,y BYTE ARRAY n BYTE POINTER count) BYTE POINTER ptr pointer to the screen memory ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |