diff --git a/victoria.binkovskaya/10.1_task_writeln2_procedure.pas b/victoria.binkovskaya/10.1_task_writeln2_procedure.pas new file mode 100644 index 0000000..17087f6 --- /dev/null +++ b/victoria.binkovskaya/10.1_task_writeln2_procedure.pas @@ -0,0 +1,23 @@ +program task9_1; +uses crt; + +procedure writeln2(st: String); + var + i, l: Integer; + + begin + l := Length(st); + for i := 1 to l do + begin + write(st[i]); + delay (50); + end; + writeln(); + end; + +begin + writeln2('Have a nice day'); + writeln2('Have a great day'); + writeln2('Have a good mood'); + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/10.2_task_array.pas b/victoria.binkovskaya/10.2_task_array.pas new file mode 100644 index 0000000..0925611 --- /dev/null +++ b/victoria.binkovskaya/10.2_task_array.pas @@ -0,0 +1,61 @@ +program task9_2; + +var + a: array [ 1..7 ] of Integer; + i: Integer; + // i, j, k, l, m, n, o: Integer; + +begin + + for i := 1 to 7 do + begin + writeln('Enter number, please'); + readln(a[i]); + end; + + for i := 1 to 7 do + begin + if (a[i] mod 2 = 0) then + begin + writeln (a[i]); + end; + end; + // writeln('Enter 1 number, please'); + // readln(i); + // writeln('Enter 2 number, please'); + // readln(j); + // writeln('Enter 3 number, please'); + // readln(k); + // writeln('Enter 4 number, please'); + // readln(l); + // writeln('Enter 5 number, please'); + // readln(m); + // writeln('Enter 6 number, please'); + // readln(n); + // writeln('Enter 7 number, please'); + // readln(o); + + // if (i mod 2) = 0 then + // writeln(i); + + // if (j mod 2) = 0 then + // writeln(j); + + // if (k mod 2) = 0 then + // writeln(k); + + // if (l mod 2) = 0 then + // writeln(l); + + // if (m mod 2) = 0 then + // writeln(m); + + // if (n mod 2) = 0 then + // writeln(n); + + // if (o mod 2) = 0 then + // writeln(o); + + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/10.3_task_array.pas b/victoria.binkovskaya/10.3_task_array.pas new file mode 100644 index 0000000..ff70e62 --- /dev/null +++ b/victoria.binkovskaya/10.3_task_array.pas @@ -0,0 +1,18 @@ +program task9_3; +uses crt; + +var + st: array [ 1..256 ] of Char; + i, l: Integer; + +begin + st := 'Have a nice day'; + l := Length(st); + for i := 1 to l do + begin + write(st[i]); + delay (50); + end; + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/9.4_task_array.pas b/victoria.binkovskaya/10.4_task_array.pas similarity index 100% rename from victoria.binkovskaya/9.4_task_array.pas rename to victoria.binkovskaya/10.4_task_array.pas diff --git a/victoria.binkovskaya/10.5_task_double_string.pas b/victoria.binkovskaya/10.5_task_double_string.pas new file mode 100644 index 0000000..118c599 --- /dev/null +++ b/victoria.binkovskaya/10.5_task_double_string.pas @@ -0,0 +1,53 @@ +program task9_5; +uses crt; + +var + st: String; + // newSt: String; + i, count: Integer; + +begin + writeln('Enter the line, please'); + readln(st); + + for i := 1 to length(st) do + begin + write(st[i]); + write(st[i]); + end; + + writeln(); + + // _________else_variants________ + + // newSt := ''; + // for i := 1 to length(st) do + // begin + // newSt := newSt + st[i] + st[i]; + // end; + // writeln(newSt); + + // i := 1; + // repeat + // begin + // insert(st[i], st, i); + // inc(i, 2); + // end; + // until i > length(st); + + // ______end_of_else_variants_____ + + count := 0; + + for i := 1 to length(st) do + begin + if st[i] = 'a' then + begin + count := count + 1; + end; + end; + + writeln('Quantity of letters "a": ', count); + readln(); + +end. \ No newline at end of file diff --git a/victoria.binkovskaya/10.6_task_double_string_procedure_function.pas b/victoria.binkovskaya/10.6_task_double_string_procedure_function.pas new file mode 100644 index 0000000..c338e63 --- /dev/null +++ b/victoria.binkovskaya/10.6_task_double_string_procedure_function.pas @@ -0,0 +1,50 @@ +program task10_6; +uses crt; + +var + str: String; + count: Integer; + +procedure writeDouble(st: String); + var + i: Integer; + + begin + for i := 1 to length(st) do + begin + write(st[i]); + write(st[i]); + end; + writeln(); + end; + +function FindLetter(st: String): Integer; + var + i: Integer; + + begin + count := 0; + + for i := 1 to length(st) do + begin + if (st[i] = 'a') then + begin + count := count + 1; + end; + end; + FindLetter := count; + end; + +begin + writeln('Enter the sentence, please'); + + readln(str); + + writeln('Result:'); + writeDouble(str); + + writeln('Result:'); + writeln('Quantity of letters "a": ', FindLetter(str)); + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/11.1_task_word.pas b/victoria.binkovskaya/11.1_task_word.pas new file mode 100644 index 0000000..4f8ebe6 --- /dev/null +++ b/victoria.binkovskaya/11.1_task_word.pas @@ -0,0 +1,31 @@ +program cw_25_08; + +var + st, word, indent: String; + i, leng: Integer; + +begin + writeln('Enter the line, please'); + readln(st); + + leng := length(st); + word := ''; + indent := ' '; + + for i := 1 to leng do + begin + if st[i] <> indent then + begin + word := word + st[i]; + end + else + begin + writeln(word); + word := ''; + end; + end; + writeln(word); + word := ''; + readln(); +end. + diff --git a/victoria.binkovskaya/11.2_task_word.pas b/victoria.binkovskaya/11.2_task_word.pas new file mode 100644 index 0000000..f8f5e98 --- /dev/null +++ b/victoria.binkovskaya/11.2_task_word.pas @@ -0,0 +1,32 @@ +program cw_25_08; + +var + st, word: String; + i, leng, osi: Integer; + +begin + writeln('Enter the line, please'); + readln(st); + + leng := length(st); + word := ''; + + for i := 1 to leng do + begin + osi := Ord(st[i]); + + if ((osi >= 65) and (osi <= 90)) or ((osi >= 97) and (osi <= 122)) then + begin + word := word + st[i]; + end + else + begin + writeln(word); + word := ''; + end; + end; + writeln(word); + word := ''; + readln(); +end. + diff --git a/victoria.binkovskaya/11.3_task_low_mid_high.pas b/victoria.binkovskaya/11.3_task_low_mid_high.pas new file mode 100644 index 0000000..6486c03 --- /dev/null +++ b/victoria.binkovskaya/11.3_task_low_mid_high.pas @@ -0,0 +1,48 @@ +program cw_25_08; + +var + a: array[1..10] of Integer = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); + search: Integer; // искомое + index: Integer; + low, high, mid: Integer; + +begin + writeln('Enter the searching number'); + readln(search); + + low := 1; + high := length(a); + + index := -1; + + while low <= high do + begin + mid := (low + high) div 2; + + if a[mid] = search then + begin + //writeln('found at index ', mid); + index := mid; + break; + end; + + if a[mid] > search then + begin + high := mid - 1; + end + else + begin + low := mid + 1; + end; + end; + + if index = -1 then + begin + writeln('not found'); + end + else + begin + writeln('found at index ', index); + end; + readln(); +end. diff --git a/victoria.binkovskaya/12.1_task_hello_file.pas b/victoria.binkovskaya/12.1_task_hello_file.pas new file mode 100644 index 0000000..20c71b4 --- /dev/null +++ b/victoria.binkovskaya/12.1_task_hello_file.pas @@ -0,0 +1,30 @@ +program task_11_1; +uses sysutils; + +var + f: TexTFile; + n: Integer; + +begin + Assign(f, '11.1_task_hello_file.txt'); + // Rewrite(f); // создать новый / перезаписать старый + Reset(f); // только для чтения + // Append(f); // дописать в конец + // write(f, 'Make up your mind! '); + while not eof(f) do + begin + read(f, n); + write(n, ' '); + + if eoln(f) then + begin + writeln(); + end; + end; + + // eof(f) // End of file + // eoln(f) // End of line + + Close(f); // обязательно закрыть файл перед выходом с программы + readln(); +end. diff --git a/victoria.binkovskaya/12.1_task_hello_file.txt b/victoria.binkovskaya/12.1_task_hello_file.txt new file mode 100644 index 0000000..3f350de --- /dev/null +++ b/victoria.binkovskaya/12.1_task_hello_file.txt @@ -0,0 +1,4 @@ +12 13 14 +35 36 37 +44 45 46 +10 11 12 \ No newline at end of file diff --git a/victoria.binkovskaya/12.2_task_visitors_file.pas b/victoria.binkovskaya/12.2_task_visitors_file.pas new file mode 100644 index 0000000..050bfe4 --- /dev/null +++ b/victoria.binkovskaya/12.2_task_visitors_file.pas @@ -0,0 +1,61 @@ +program task_11_2; +uses sysutils; + +var + Visitors: array[1..10] of String; + NeedVisitor: String; + i: Integer; // искомое + f: TexTFile; + +begin + i := 1; + + Assign(f, '11.2_task_visitors_file.txt'); + Reset(f); + + while not eof(f) do + begin + readln(f, Visitors[i]); + i := i + 1; + end; + Close(f); + + // Visitors[1]:='Jackson'; + // Visitors[2]:='Smith'; + // Visitors[3]:='Hardy'; + // Visitors[4]:='Mickey'; + // Visitors[5]:='Colins'; + // Visitors[6]:='Celentano'; + // Visitors[7]:='Jobs'; + // Visitors[8]:='Handerson'; + // Visitors[9]:='Cillian'; + // Visitors[10]:='Bradshow'; + + for i := 1 to 10 do + begin + writeln(Visitors[i]); + end; + + readln(NeedVisitor); + + i := 1; + + while i <= 10 do + begin + if Uppercase(Visitors[i]) = Uppercase(NeedVisitor) then + //if Visitors[i] = NeedVisitor then + begin + writeln('found at index', i); + break; + end; + + i := i + 1; + end; + + if i > 10 then + begin + writeln('not found'); + end; + + readln(); +end. diff --git a/victoria.binkovskaya/12.2_task_visitors_file.txt b/victoria.binkovskaya/12.2_task_visitors_file.txt new file mode 100644 index 0000000..c92a1e5 --- /dev/null +++ b/victoria.binkovskaya/12.2_task_visitors_file.txt @@ -0,0 +1,10 @@ +Jackson +Smith +Hardy +Mickey +Colins +Celentano +Jobs +Handerson +Cillian +Bradshow \ No newline at end of file diff --git a/victoria.binkovskaya/13.1_task_bubble_sort.pas b/victoria.binkovskaya/13.1_task_bubble_sort.pas new file mode 100644 index 0000000..63f5604 --- /dev/null +++ b/victoria.binkovskaya/13.1_task_bubble_sort.pas @@ -0,0 +1,31 @@ +program task_12_1; + +var + a: array[1..10] of Integer = (2,5,2,7,9,2,5,3,1,7); + i, j, x: Integer; + +begin + // randomize; + i := 0; + // a[i] := random(50) + 1; + + for j := 1 to 10 do + begin + for i := 1 to 10 - j do + begin + if a[i] > a[i + 1] then + begin + x := a[i]; + a[i] := a[i+1]; + a[i+1] := x; + end; + end; + + for i := 1 to 10 do + begin + writeln(a[i]); + end; + end; + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/14.1_task_graph_mode.pas b/victoria.binkovskaya/14.1_task_graph_mode.pas new file mode 100644 index 0000000..38f65a5 --- /dev/null +++ b/victoria.binkovskaya/14.1_task_graph_mode.pas @@ -0,0 +1,81 @@ +program graph22; +uses crt, graph; + +var + gb, gm, i , j, x, y, sum: Integer; // x, y, r, dx, dy + + +begin + x := 0; + y := 0; + // r := 20; + // dx := 10; + // dy := 10; + sum := 0; + i := 0; + j := 0; + + gb := detect; + InitGraph(gb, gm, ''); + + for i := 1 to 8 do + begin + y := y + 10; + x := 0; + for j := 1 to 8 do + begin + sum := i + j; + x := x + 10; + if (sum mod 2 = 0) then + begin + Setfillstyle(1, 3); + end + else + begin + Setfillstyle(2, 4); + end; + Bar(x, y, x + 10, y + 10); + end; + end; + + //____________________________________________ + // Setcolor(3); + + // repeat + // Setfillstyle(1, 3); + + // Bar(0, 0, GetMaxX, GetMaxY); + // x := x + dx; + // y := y + dy; + + // Setfillstyle(2, 4); + // FillEllipse(y, y, r, r); + + // delay(4000); + + // until keypressed; + + //____________________________________________ + + // line(0, 0, 100, 100); // две координаты + // circle(100, 100, 100); // центр и 2 радиуса + + // lineto(100, 100); + // lineto(200, 100); + // linerel(100, 100); + + // Setfillstyle(2, 3); + // FillEllipse(100, 100, 30, 100); + + // circle(100, 100, 100); + + + // SetBkColor(blue); + // delay(10000); + + readln; + closegraph; + // delay(10000); + // readln; + readkey; +end. \ No newline at end of file diff --git a/victoria.binkovskaya/14.2_task_graph_drawing.pas b/victoria.binkovskaya/14.2_task_graph_drawing.pas new file mode 100644 index 0000000..86ab828 --- /dev/null +++ b/victoria.binkovskaya/14.2_task_graph_drawing.pas @@ -0,0 +1,137 @@ +program task14_2; +uses graph; + +var + GrDr, GrMd: Integer; + +begin + GrDr := detect; + InitGraph(GrDr, GrMd, ''); + + SetFillStyle(SolidFill, lightblue); + Bar(0, 0, GetMaxX, GetMaxY div 3); + + SetFillStyle(SolidFill, lightgreen); + Bar(0, GetMaxY div 3, GetMaxX, GetMaxY); + + SetColor(yellow); + Setfillstyle(1, yellow); + FillEllipse(170, 80, 50, 50); + + SetColor(cyan); + Setfillstyle(1, cyan); + FillEllipse(GetMaxX - 310, GetMaxY - 100, 280, 80); + + SetFillStyle(1, brown); + Bar(950, 270, 990, 470); + + SetColor(green); + Setfillstyle(1, green); + FillEllipse(950, 75, 65, 65); + + SetColor(green); + Setfillstyle(1, green); + FillEllipse(900, 150, 65, 65); + + SetColor(green); + Setfillstyle(1, green); + FillEllipse(1020, 160, 65, 65); + + SetColor(green); + Setfillstyle(1, green); + FillEllipse(950, 230, 65, 65); + + SetColor(red); + Setfillstyle(1, red); + FillEllipse(970, 255, 9, 9); + + SetColor(red); + Setfillstyle(1, red); + FillEllipse(950, 210, 9, 9); + + SetColor(red); + Setfillstyle(1, red); + FillEllipse(980, 165, 9, 9); + + SetColor(red); + Setfillstyle(1, red); + FillEllipse(900, 170, 9, 9); + + SetColor(red); + Setfillstyle(1, red); + FillEllipse(935, 125, 9, 9); + + SetColor(red); + Setfillstyle(1, red); + FillEllipse(980, 70, 9, 9); + + SetFillStyle(1, DarkGray); + Bar(750, 440, 766, 480); + + SetColor(magenta); + Setfillstyle(1, magenta); + PieSlice(758, 440, 0, 180, 50); + + SetColor(Green); + Line(35, 405, 65, 440); + + SetColor(Green); + Line(63, 380, 65, 440); + + SetColor(Green); + Line(105, 381, 65, 440); + + SetColor(Green); + Line(104, 425, 63, 437); + + SetColor(Green); + Line(155, 505, 185, 540); + + SetColor(Green); + Line(183, 480, 185, 540); + + SetColor(Green); + Line(225, 481, 185, 540); + + SetColor(Green); + Line(224, 525, 183, 537); + + SetColor(Green); + Line(275, 605, 305, 640); + + SetColor(Green); + Line(303, 580, 305, 640); + + SetColor(Green); + Line(345, 581, 305, 640); + + SetColor(Green); + Line(344, 625, 303, 637); + + SetColor(Green); + Line(315, 400, 345, 435); + + SetColor(Green); + Line(343, 375, 345, 435); + + SetColor(Green); + Line(385, 376, 345, 435); + + SetColor(Green); + Line(384, 420, 343, 432); + + SetColor(Green); + Line(425, 510, 455, 545); + + SetColor(Green); + Line(453, 485, 455, 545); + + SetColor(Green); + Line(495, 486, 455, 545); + + SetColor(Green); + Line(496, 530, 453, 542); + + readln; + CloseGraph; +end. diff --git a/victoria.binkovskaya/15.1_task_factorial_function_recursion.pas b/victoria.binkovskaya/15.1_task_factorial_function_recursion.pas new file mode 100644 index 0000000..9870ff2 --- /dev/null +++ b/victoria.binkovskaya/15.1_task_factorial_function_recursion.pas @@ -0,0 +1,32 @@ +program task_14_1; + +var + n: Integer; + +function fact(n: Integer): Integer; +begin + if n = 0 then + begin + fact := 1; + end + else + begin + fact := n * fact(n - 1); + end; +end; + // begin + // result := 1; + // factorial := 1; + + // for i := 1 to n do + // result := result * i; + // writeln('n! = ', result); + // end; + +begin + writeln('Enter the number, please'); + readln(n); + fact(n); + writeln(fact(n)); + readln(); +end. diff --git a/victoria.binkovskaya/15.2_task_low_mid_high_function_recursion.pas b/victoria.binkovskaya/15.2_task_low_mid_high_function_recursion.pas new file mode 100644 index 0000000..eab6948 --- /dev/null +++ b/victoria.binkovskaya/15.2_task_low_mid_high_function_recursion.pas @@ -0,0 +1,44 @@ +program task_14_2; + +const + N = 10; + // N = 10; CONSTANTS = CAPS + NOT_FOUND = -1; +type + arr = array[1..N] of Integer; +var + a: arr = (1, 3, 5, 7, 9, 11, 13, 15, 17, 19); + +function bsearch(a: arr; val, low, high: Integer): Integer; + +var + mid: Integer; + +begin + if high < low then + begin + bsearch := NOT_FOUND; + exit; + end; + + mid := (low + high) div 2; + + if a[mid] > val then + begin + bsearch := bsearch(a, val, low, mid - 1); + end + else + if a[mid] < val then + begin + bsearch := bsearch(a, val, mid + 1, high); + end + else + begin + bsearch := mid; + end; +end; + +begin + writeln(bsearch(a, 7, 1, N)); + readln(); +end. diff --git a/victoria.binkovskaya/15.3_task_digit_sum_function_recursion.pas b/victoria.binkovskaya/15.3_task_digit_sum_function_recursion.pas new file mode 100644 index 0000000..145d0b9 --- /dev/null +++ b/victoria.binkovskaya/15.3_task_digit_sum_function_recursion.pas @@ -0,0 +1,24 @@ +program task_14_3; + +var + n: Integer; + +function DigitSum(n: Integer): Integer; + +begin + if n < 10 then + begin + DigitSum := n; + end + else + begin + DigitSum := DigitSum(n div 10) + n mod 10; + end; +end; + +begin + writeln('Enter the number, please'); + readln(n); + writeln(DigitSum(n)); + readln(); +end. diff --git a/victoria.binkovskaya/5.4.1_task_max_min_average.pas b/victoria.binkovskaya/5.4.1_task_max_min_average.pas index 3313d79..2a69e16 100644 --- a/victoria.binkovskaya/5.4.1_task_max_min_average.pas +++ b/victoria.binkovskaya/5.4.1_task_max_min_average.pas @@ -10,6 +10,7 @@ average := 0; repeat + begin writeln('Enter the number, please'); readln(a); @@ -17,12 +18,12 @@ if count = 1 then begin max := a; + min := a; end; if a > max then begin max := a; - min := a; end; if (a < min) and (a <> 0) then @@ -31,7 +32,7 @@ end; sum := sum + a; - + end; until a = 0; average := sum / count; diff --git a/victoria.binkovskaya/5.4_task_zero.pas b/victoria.binkovskaya/5.4_task_zero.pas new file mode 100644 index 0000000..923355a --- /dev/null +++ b/victoria.binkovskaya/5.4_task_zero.pas @@ -0,0 +1,21 @@ +program task5_4; + +var + i, a: Integer; + +begin + for i := 1 to 10 do + begin + writeln('Enter the number, please'); + readln(a); + + if a = 0 then + begin + writeln('zero'); + break; + end; + writeln(a); + end; + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/5.5_task_more_less.pas b/victoria.binkovskaya/5.5_task_more_less.pas index 7d2583b..ed94207 100644 --- a/victoria.binkovskaya/5.5_task_more_less.pas +++ b/victoria.binkovskaya/5.5_task_more_less.pas @@ -9,26 +9,26 @@ i := random(100) + 1; repeat - - writeln('Enter the number, please'); - readln(number); - - if (number <= 0) or (number > 100) then begin - writeln('Entering incorrect data'); - continue; - end; + writeln('Enter the number, please'); + readln(number); - if number < i then + if (number <= 0) or (number > 100) then begin - writeln('more'); + writeln('Entering incorrect data'); + continue; end; - - if number > i then - begin - writeln('less'); - end; - + + if number < i then + begin + writeln('more'); + end; + + if number > i then + begin + writeln('less'); + end; + end; until number = i; writeln('You win!'); diff --git a/victoria.binkovskaya/6.1_task_random_from_20_to_50.pas b/victoria.binkovskaya/6.1_task_random_from_20_to_50.pas new file mode 100644 index 0000000..605fe25 --- /dev/null +++ b/victoria.binkovskaya/6.1_task_random_from_20_to_50.pas @@ -0,0 +1,16 @@ +program task6_1; + +var + i, r: Integer; + +begin + i := 0; + + for i := 20 to 50 do + begin + r := Random(50) + 1; + writeln(r); + end; + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/6.2.1_task_sum_of_randoms.pas b/victoria.binkovskaya/6.2.1_task_sum_of_randoms.pas new file mode 100644 index 0000000..2c6e3c2 --- /dev/null +++ b/victoria.binkovskaya/6.2.1_task_sum_of_randoms.pas @@ -0,0 +1,21 @@ +program task6_2_1; + +var + i, r, sum: Integer; + +begin + randomize; + + i := 0; + sum := 0; + + for i := 1 to 30 do + begin + r := Random(50) + 1; + sum := sum + r; + writeln(r); + end; + + writeln('The sum of randoms is:', sum); + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/6.2.2_task_sum_of_randoms.pas b/victoria.binkovskaya/6.2.2_task_sum_of_randoms.pas new file mode 100644 index 0000000..2d7f54e --- /dev/null +++ b/victoria.binkovskaya/6.2.2_task_sum_of_randoms.pas @@ -0,0 +1,20 @@ +program task6_2_2; + +var + i, r, sum: Integer; + +begin + randomize; + + i := 0; + sum := 0; + + for i := 1 to 30 do + begin + r := Random(50) + 1; + sum := sum + r; + + writeln(r, ' sum: ', sum); + end; + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/6.3_task_multiplication_table_for_four.pas b/victoria.binkovskaya/6.3_task_multiplication_table_for_four.pas new file mode 100644 index 0000000..cc2a42d --- /dev/null +++ b/victoria.binkovskaya/6.3_task_multiplication_table_for_four.pas @@ -0,0 +1,20 @@ +program task6_3; + +var + i, j, mult: Integer; + +begin + i := 0; + j := 0; + mult := 0; + + for i := 1 to 10 do + begin + j := 4; + mult := i * j; + writeln(j,' * ',i,' = ',mult,' '); + writeln(); + end; + +readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/6.4_task_multiplication_table.pas b/victoria.binkovskaya/6.4_task_multiplication_table.pas new file mode 100644 index 0000000..5518ec3 --- /dev/null +++ b/victoria.binkovskaya/6.4_task_multiplication_table.pas @@ -0,0 +1,24 @@ +program task6_4; + +var + i, j, mult: Integer; + +begin + i := 0; + j := 0; + mult := 0; + + for i := 1 to 10 do + begin + + for j := i to 10 do + begin + mult := i * j; + writeln(i,' * ',j,' = ',mult,' '); + end; + + writeln(); + end; + +readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/6.5_task_ jay_and_silent_bob.pas b/victoria.binkovskaya/6.5_task_ jay_and_silent_bob.pas new file mode 100644 index 0000000..ee827a4 --- /dev/null +++ b/victoria.binkovskaya/6.5_task_ jay_and_silent_bob.pas @@ -0,0 +1,90 @@ +program task6_5; + +var + i, jay, bob, choise, sumjay, sumbob: Integer; + +begin + randomize; + + writeln('Enter your bet:'); + writeln('1 - Jay'); + writeln('2 - Bob'); + writeln(); + + readln(choise); + + case choise of + 1: + begin + writeln('You choose ', choise, ' - Jay'); + end; + 2: + begin + writeln('You choose ', choise, ' - Bob'); + end; + else + begin + writeln('entering incorrect data'); + end; + end; + + writeln(); + readln(); + + i := 0; + sumjay := 0; + sumbob := 0; + + for i := 1 to 7 do + begin + jay := Random(4) + 3; + sumjay := sumjay + jay; + + bob := Random(4) + 3; + sumbob := sumbob + bob; + + writeln('Day ', i); + writeln('Jay caught ', jay, ' pokemons (now he has ', sumjay, ')'); + writeln('Bob caught ', bob, ' pokemons (now he has ', sumbob, ')'); + end; + + readln(); + writeln(); + writeln('Jay got ', sumjay); + writeln('Bob got ', sumbob); + writeln(); + readln(); + + if sumjay = sumbob then + begin + writeln('It is a tie.'); + writeln('You lose the bet.'); + end; + + if sumjay > sumbob then + begin + writeln('Jay wins!'); + if choise = 1 then + begin + writeln('You won the bet.'); + end + else + begin + writeln('You lose the bet.'); + end; + end + else + begin + writeln('Bob wins!'); + if choise = 2 then + begin + writeln('You won the bet.'); + end + else + begin + writeln('You lose the bet.'); + end; + end; + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/6.6_task_ jay_and_silent_bob.pas b/victoria.binkovskaya/6.6_task_ jay_and_silent_bob.pas new file mode 100644 index 0000000..00a0673 --- /dev/null +++ b/victoria.binkovskaya/6.6_task_ jay_and_silent_bob.pas @@ -0,0 +1,94 @@ +program task6_6; + +var + i, jay, bob, choise, sumjay, sumbob: Integer; + +begin + randomize; + + writeln('Enter your bet:'); + writeln('1 - Jay'); + writeln('2 - Bob'); + writeln(); + + readln(choise); + + case choise of + 1: + begin + writeln('You choose ', choise, ' - Jay'); + end; + 2: + begin + writeln('You choose ', choise, ' - Bob'); + end; + else + begin + writeln('entering incorrect data'); + exit; + end; + end; + + writeln(); + readln(); + + i := 0; + sumjay := 0; + sumbob := 0; + + while not ((sumjay >= 50) or (sumbob >= 50)) do + begin + + jay := Random(4) + 3; + sumjay := sumjay + jay; + + bob := Random(4) + 3; + sumbob := sumbob + bob; + i := i + 1; + + writeln('Day ', i); + writeln('Jay caught ', jay, ' pokemons (now he has ', sumjay, ')'); + writeln('Bob caught ', bob, ' pokemons (now he has ', sumbob, ')'); + end; + + readln(); + writeln(); + writeln('Jay got ', sumjay); + writeln('Bob got ', sumbob); + writeln(); + readln(); + + if (sumjay >= 50) and (sumbob >= 50) then + begin + writeln('It is a tie.'); + end + else + begin + if sumjay > sumbob then + begin + writeln('Jay wins!'); + if choise = 1 then + begin + writeln('You won the bet.'); + end + else + begin + writeln('You lose the bet.'); + end; + end + else + begin + writeln('Bob wins!'); + if choise = 2 then + begin + writeln('You won the bet.'); + end + else + begin + writeln('You lose the bet.'); + end; + end; + end; + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/7.1_task_even_odd.pas b/victoria.binkovskaya/7.1_task_even_odd.pas new file mode 100644 index 0000000..0544f50 --- /dev/null +++ b/victoria.binkovskaya/7.1_task_even_odd.pas @@ -0,0 +1,30 @@ +program task7_1; + +var + i, j, sum: Integer; + +begin + i := 0; + j := 0; + sum := 0; + + writeln('Enter the number, please'); + readln(i); + + while i > 0 do + begin + j := (i mod 10); + i := (i div 10); + + if (j mod 2) = 0 then + begin + writeln ('even'); + sum := sum + j; + end + else + begin + writeln ('odd'); + end; + end; + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/7.2_task_binary_system_001.pas b/victoria.binkovskaya/7.2_task_binary_system_001.pas new file mode 100644 index 0000000..561c801 --- /dev/null +++ b/victoria.binkovskaya/7.2_task_binary_system_001.pas @@ -0,0 +1,29 @@ +program task7_3; + +var + i, j: Integer; + st: String; + +begin + writeln ('Enter the number, please'); + readln(i); + + st := ''; + while i <> 0 do + begin + j := i mod 2; + i := i div 2; + + if j = 0 then + begin + st := '0' + st; + end + else + begin + st := '1' + st; + end; + end; + + writeln(st); + readln(); +end. diff --git a/victoria.binkovskaya/7.3_task_fir_tree.pas b/victoria.binkovskaya/7.3_task_fir_tree.pas new file mode 100644 index 0000000..cdd41cb --- /dev/null +++ b/victoria.binkovskaya/7.3_task_fir_tree.pas @@ -0,0 +1,29 @@ +program task7_3; + +var + i, j, level, Nspace, Ncaret: integer; + +begin + writeln('Enter the height of fir-tree, please'); + readln(level); + writeln(); + + for i := 1 to level do + begin + Nspace := level - i; + + for j := 1 to Nspace do + begin + write(' '); + end; + + Ncaret := i * 2 - 1; + + for j := 1 to Ncaret do + begin + write('^'); + end; + writeln(); + end; + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/8.1_task_fir_tree.pas b/victoria.binkovskaya/8.1_task_fir_tree.pas new file mode 100644 index 0000000..c636b53 --- /dev/null +++ b/victoria.binkovskaya/8.1_task_fir_tree.pas @@ -0,0 +1,126 @@ +program task8_1; + +var + i, j, level, Nspace, Ncaret: integer; + +begin + writeln('Enter the height of fir-tree, please'); + readln(level); + writeln(); + +//________________________________________ +// 1. +// vvvvv +// vvv +// v + for i := 1 to level do + begin + Nspace := i + 1 - 2; + + for j := 1 to Nspace do + begin + write(' '); + end; + + Ncaret := (level - i) * 2 + 1; + + for j := 1 to Ncaret do + begin + write('v'); + end; + writeln(); + end; +//________________________________________ + + writeln(); + +//________________________________________ +// 2. +// ^ +// ^^^ +// ^^^^^ + +for i := 1 to level do + begin + Ncaret := i * 2 - 1; + + for j := 1 to Ncaret do + begin + write('^'); + end; + writeln(); + end; +//________________________________________ + + writeln(); + +//________________________________________ +// 3. +// ^ +// ^^^ +// ^^^^^ + for i := 1 to level do + begin + Nspace := (level * 2) - (i * 2); + for j := 1 to Nspace do + begin + write(' '); + end; + + Ncaret := i * 2 - 1; + + for j := 1 to Ncaret do + begin + write('^'); + end; + writeln(); + end; +//________________________________________ + + writeln(); + +//________________________________________ +// 4. +// vvvvv +// vvv +// v + +for i := 1 to level do + begin + Nspace := (i * 2) - 2; + for j := 1 to Nspace do + begin + write(' '); + end; + + Ncaret := (level - i) * 2 + 1; + + for j := 1 to Ncaret do + begin + write('v'); + end; + writeln(); + end; +//________________________________________ + + writeln(); + +//________________________________________ +// 5. +// vvvvv +// vvv +// v + + for i := 1 to level do + begin + Ncaret := (level - i) * 2 + 1; + + for j := 1 to Ncaret do + begin + write('v'); + end; + writeln(); + end; + + readln(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/8.2_task_ascii_art.pas b/victoria.binkovskaya/8.2_task_ascii_art.pas new file mode 100644 index 0000000..6e91d21 --- /dev/null +++ b/victoria.binkovskaya/8.2_task_ascii_art.pas @@ -0,0 +1,61 @@ +program task8_2; + +begin + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' **************************************************************************** '); + writeln(' ******************************************************************************* '); + writeln(' **//*////////////////////////////////////////////////////////////////////***********, '); + writeln(' ***//, ,/////////////////*.. .*/////////////, /////************ '); + writeln(' ***/*. &&&* /////////////. .,((((, .///////// &&& ////////****,****** '); + writeln(' ***// /&&& ///////////, .&@&@@&@@@@@@@@@@@@&&& ,/////// ////////*****. ******** '); + writeln(' ****/ /&&& /////////// %&&&&@&@@@@@@@@@@@@@@@@@@@@@&& ////// //////////****. ******** '); + writeln(' ***** %&&& /////////// &@&@@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@&&, ////////////////////*. & /*****, '); + writeln(' .***** &&&&/ ////////////. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&& ////////////////////. &&& /****** '); + writeln(' .***** &&&&& .///////////// &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@ ///////////////////. &&&&& ******* '); + writeln(' .****, ,&&&&&& *//////////////* &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //////////////////. &&&&&&& *******. '); + writeln(' ,***. &&&&&. *///////////////// %&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/ .................. &&&&&&&&. ***** '); + writeln(' ***/ ,&&& ////////////////////, .*(%&&@@@@@@@@@@@@@@@@@&@&@@&@@@& &&&&&&( ***** '); + writeln(' *//* # *//////////////////(((((((((/. ,%@&&&&&&&&&&&&&&&&&&&&&&& *****. '); + writeln(' //// //////////////////((((#####((((((((((((((((((((((((((((((((////*. .&&&&&&&&&&&&&&&& /****, '); + writeln(' ,//// /////////////////((((#######((((((##########(((((((((((((((((////////// ,&&&&&&&&&& /***** '); + writeln(' ////, *///////////////(((((#########(################(((((((((((((((////////////* &&&&&&. ./**** '); + writeln(' ////,//////////////((((((######%%%######%%%%%########((((((((((((((((((((((//////, &&, .//**/ '); + writeln(' ./////////////////(((((((((((((####%%%%%%%&%%%%######(((((((((((((((((((((((((//// ////*. '); + writeln(' *//// *////////(((((((((((((#####%%&&&@@@&&&%%%##########(((((((((((((((((((((((/. /////* '); + writeln(' ///// .*(((((((((((((####%%&&@@@@@@@&&%%%##########((((((((((((((((((((((((/////* '); + writeln(' ////, ..**/##%&@@@@@@@@&&%%%#########((((((((((((((((((((((((((// '); + writeln(' ,//// .&&@@@@@&(*,.. .,*(((((((((((((((((((((((((/// '); + writeln(' ///// (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*. *((((((((((((((// '); + writeln(' ///// &@@@@@@@@@&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&. (((((((((( '); + writeln(' ///// &% .&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ,(((((((/ '); + writeln(' ////, (((((((((((##/ /@@@@@@@@@@@@@@@@@@@@@@@@ ((((((( '); + writeln(' *///(,(((((((((((((((((((( ,@@@@@@@@@@@@@@@#, *((((((( '); + writeln(' ////((((((((((((((((((((#* *((((((((((((. '); + writeln(' ///(((((((((((((((((((#######((((((((((((((####((((((/ '); + writeln(' ///((((((((((((((((((((((((((((((((((((((((((((((( '); + writeln(' ////// **/((((((((((((((((((((((((((, (((((( '); + writeln(' /////* (((((( '); + writeln(' /////. &&&(, ./%@@ /(((((* '); + writeln(' ///// ,&@@@@@@@@@@@@@@@@ *(((((* '); + writeln(' *///// (&@@@@@@@@@@@@ (((((/ '); + writeln(' ////// %&@@@@@@@&( (((((( '); + writeln(' /////* &@@@@@( (((((( '); + writeln(' ./////* @&& /(((((. '); + writeln(' ,/////. /(((((/ '); + writeln(' ////// .////(( '); + writeln(' /////////// '); + writeln(' .///////. '); + writeln(' *///, '); + writeln(' , '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(); + readln(); +end. diff --git a/victoria.binkovskaya/8.4_task_game_light_bot.jpg b/victoria.binkovskaya/8.3_task_game_light_bot.jpg similarity index 100% rename from victoria.binkovskaya/8.4_task_game_light_bot.jpg rename to victoria.binkovskaya/8.3_task_game_light_bot.jpg diff --git a/victoria.binkovskaya/9.1_task_print_procedure.pas b/victoria.binkovskaya/9.1_task_print_procedure.pas new file mode 100644 index 0000000..4e7ec2d --- /dev/null +++ b/victoria.binkovskaya/9.1_task_print_procedure.pas @@ -0,0 +1,21 @@ +program task9_1; + +var + // b, + a: Integer; +procedure print(a: Integer); + // var b: Integer; +// procedure print(b: Integer); +begin + a := a + 1; + // b := b + 1; + writeln(a); + // writeln(b); +end; + +begin + a := 1; + print(a); + writeln(a); + readln (); +end. diff --git a/victoria.binkovskaya/9.2_task_print_procedure_var.pas b/victoria.binkovskaya/9.2_task_print_procedure_var.pas new file mode 100644 index 0000000..83f4ce9 --- /dev/null +++ b/victoria.binkovskaya/9.2_task_print_procedure_var.pas @@ -0,0 +1,21 @@ +program task3_funk; + +var + a, c: Integer; + +procedure print(var b: Integer); + +begin + b := b + 1; + writeln(b); +end; + +begin + a := 1; + c := 3; + print(a); + writeln(a); + print(c); + writeln(c); + readln(); +end. diff --git a/victoria.binkovskaya/9.3_task_swap_procedure.pas b/victoria.binkovskaya/9.3_task_swap_procedure.pas new file mode 100644 index 0000000..e02e6db --- /dev/null +++ b/victoria.binkovskaya/9.3_task_swap_procedure.pas @@ -0,0 +1,21 @@ +program task7_funk; +var + a: Integer; + b: Integer; + +procedure swap(var a, b: Integer); + var + c: integer; + begin + c := b; + b := a; + a := c; + end; + +begin + writeln('Enter two numbers, please'); + readln(a, b); + swap(a, b); + writeln(a,' ', b); + readln(); +end. diff --git a/victoria.binkovskaya/9.4_task_sum_var_procedure.pas b/victoria.binkovskaya/9.4_task_sum_var_procedure.pas new file mode 100644 index 0000000..f5d2464 --- /dev/null +++ b/victoria.binkovskaya/9.4_task_sum_var_procedure.pas @@ -0,0 +1,25 @@ +program task9_4; + +var + result, n: Integer; + +procedure sum(n: Integer; var res: Integer); + var + i, s: Integer; + + begin + s := 0; + for i := 1 to n do + begin + s := s + i; + end; + res := s; + end; + +begin + writeln('Enter the number, please'); + readln(n); + sum(n, result); + writeln(result); + readln(); +end. diff --git a/victoria.binkovskaya/9.5_task_sum_function.pas b/victoria.binkovskaya/9.5_task_sum_function.pas new file mode 100644 index 0000000..62d8539 --- /dev/null +++ b/victoria.binkovskaya/9.5_task_sum_function.pas @@ -0,0 +1,27 @@ +program task9_3; + +var + result, n: Integer; + +function sum(n: Integer): Integer; + var + i, s: Integer; + + begin + s := 0; + for i := 1 to n do + begin + s := s + i; + end; + sum := s; + end; + +begin + writeln('Enter the number, please'); + readln(n); + + result := sum(n); + + writeln(result); + readln(); +end. diff --git a/victoria.binkovskaya/9.6_task_sum_step_function.pas b/victoria.binkovskaya/9.6_task_sum_step_function.pas new file mode 100644 index 0000000..af2b2d3 --- /dev/null +++ b/victoria.binkovskaya/9.6_task_sum_step_function.pas @@ -0,0 +1,29 @@ +program task3_funk; + +var + result, n: Integer; + // step: Integer; + +function sum(n, step: Integer): Integer; + var + i, s, item: Integer; + + begin + s := 0; + item := 1; + for i := 1 to n do + begin + s := s + item; + item := item + step; + end; + sum := s; + end; + +begin + writeln('Enter the number, please'); + readln(n); + // step := 3; + result := sum(n, 3); + writeln(result); + readln(); +end. diff --git a/victoria.binkovskaya/9.7_task_arithmetical_progression_function.pas b/victoria.binkovskaya/9.7_task_arithmetical_progression_function.pas new file mode 100644 index 0000000..bd8bc4b --- /dev/null +++ b/victoria.binkovskaya/9.7_task_arithmetical_progression_function.pas @@ -0,0 +1,27 @@ +program task9_4; + +var + a1, n, step: Integer; + result: Real; + +function sum(a1, n, step: Integer): Real; + var + an, i: Integer; + s: Real; + + begin + s := 0; + an := a1 + (n - 1) * step; + s := (a1 + an) * n / 2; + sum := s; + end; + +begin + writeln('Enter the number, please'); + readln(a1, n, step); + // step := 3; + result := sum(a1, n, step); + + writeln(result:0:2); + readln(); +end. diff --git a/victoria.binkovskaya/9.8_task_pow_function.pas b/victoria.binkovskaya/9.8_task_pow_function.pas new file mode 100644 index 0000000..aa3e913 --- /dev/null +++ b/victoria.binkovskaya/9.8_task_pow_function.pas @@ -0,0 +1,27 @@ +program task9_3; +uses crt; + +var + a, b: Integer; + +function pow(x,z: Integer): Integer; + var + i, res: Integer; + + begin + res := 1; + + for i := 1 to z do + begin + res := res * x; + end; + + pow := res; + end; + +begin + read(a,b); + writeln(pow(a,b)); + + readkey(); +end. diff --git a/victoria.binkovskaya/9.9_task_procedure_fir_tree.pas b/victoria.binkovskaya/9.9_task_procedure_fir_tree.pas new file mode 100644 index 0000000..a7fd491 --- /dev/null +++ b/victoria.binkovskaya/9.9_task_procedure_fir_tree.pas @@ -0,0 +1,21 @@ +program task2_funk; +uses crt; + +procedure WriteTree(level: Integer); + var + i,j: integer; + begin + for i:=1 to level do + begin + for j := 1 to level - i do + write(' '); + for j := 1 to i * 2 - 1 do + write('^'); + writeln (); + end; + readkey(); + end; + +begin + writeTree (10); +end. diff --git a/victoria.binkovskaya/main_project/About_Game.txt b/victoria.binkovskaya/main_project/About_Game.txt new file mode 100644 index 0000000..c131275 --- /dev/null +++ b/victoria.binkovskaya/main_project/About_Game.txt @@ -0,0 +1,76 @@ + "" + +- - - - - - - - - - - - - - - - - - - - - - - - - - - + ? ( ) + +1. . +2. . +3. , + . +4. , . +5. , . + +- - - - - - - - - - - - - - - - - - - - - - - - - - - + ? + + --> --> 1 2 --> + 1 --> --> + --> 1- - - 1 + --> 2 + --> 2- - ( ) --> + --> 1 (, , + ) --> 2 + +- - - - - - - - - - - - - - - - - - - - - - - - - - - + + ? + +1. ( : 2. + ). +2. . +3. " " . +4. (" " + ( )). +5. , + . +6. . +7. , . + +- - - - - - - - - - - - - - - - - - - - - - - - - - - + ? + +1. , . +2. , , + , , . + +- - - - - - - - - - - - - - - - - - - - - - - - - - - + ? + +1. ; +2. ; +3. ( , ); +4. ; +5. (). + +- - - - - - - - - - - - - - - - - - - - - - - - - - - + ? () + +1. ( ); +2. ( 3 ); +3. ( 2 ); +4. ( ); +5. ( ); +6. ( ); +7. , ( 2 ); +8. ( 3 ); +9. . + ( 3 ); +10. ( 1 ); +11. ( 2 ); +12. ( 2 ); +13. ( ); +14. , ( 2 ); +15. , ( 3 ); +16. ( ); +17. ( 3 ); + +- - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/victoria.binkovskaya/main_project/Jumanji_v.1.0.pas b/victoria.binkovskaya/main_project/Jumanji_v.1.0.pas new file mode 100644 index 0000000..39b969e --- /dev/null +++ b/victoria.binkovskaya/main_project/Jumanji_v.1.0.pas @@ -0,0 +1,139 @@ +program project; + +uses + wingraph, wincrt; + +const + // значение - номера цветов + BG_COLOR = 233; + MAIN_FIELD_COLOR = 138; + GAME_FIELDS_COLOR = 42; + CHIPS_COLOR = 35; + + // значение - ширина отступа в пикселях + MAIN_FIELD = 35; + +var + gm, gd: smallInt; + +// фон +procedure BGround(); + var + BkColor: Integer; + + begin + BkColor := BG_COLOR; + SetColor(BkColor); + SetFillStyle(solidfill, BkColor); + Bar(0, 0, GetMaxX, GetMaxY); + end; + +// основное поле +procedure MField(); + var + BkColor: Integer; + + begin + BkColor := MAIN_FIELD_COLOR; + SetColor(BkColor); + SetFillStyle(solidfill, BkColor); + Bar(0 + MAIN_FIELD, 0 + MAIN_FIELD, GetMaxX - MAIN_FIELD, GetMaxY - MAIN_FIELD); + end; + +// разделитель между полями +procedure DelField(); + var + BkColor: Integer; + + begin + BkColor := BG_COLOR; + SetColor(BkColor); + SetFillStyle(solidfill, BkColor); + Bar((GetMaxX - (GetMaxX div 3)), 0, ((GetMaxX - (GetMaxX div 3)) + MAIN_FIELD), GetMaxY); + end; + +procedure DelField2(); + var + BkColor: Integer; + + begin + BkColor := BG_COLOR; + SetColor(BkColor); + SetFillStyle(solidfill, BkColor); + Bar((GetMaxX - (GetMaxX div 3)), (GetMaxY - (GetMaxY div 3)), GetMaxX, ((GetMaxY - (GetMaxY div 3)) + MAIN_FIELD)); + end; + +// // текстовое поле +// procedure TextField(str: String); + +// // кубики +// procedure Dice(); + +// ячейки игрового поля +procedure GameFields(); + var + BkColor: Integer; + + begin + BkColor := GAME_FIELDS_COLOR; + SetColor(BkColor); + SetFillStyle(solidfill, BkColor); + Bar(50, 660, 80, 690); + end; + + +// фишки +procedure Chips(); + var + BkColor: Integer; + + begin + BkColor := CHIPS_COLOR; + SetColor(BkColor); + SetFillStyle(solidfill, BkColor); + FillEllipse(65, 675, 10, 10); + end; + +procedure ChangeFont; +var font:smallint; +begin + font := InstallUserFont('Verdana'); + if (font < 0) then + Exit; + SetTextStyle(font, HorizDir, 28); +end; + +begin + + // инициализация графического режима + gd := SVGA; + gm := mMaximized; + InitGraph(gd,gm, ''); + + // начало основной программы + // основной фон + BGround(); + + // внутренний фон + MField(); + + // перегородка поля вертикальная + DelField(); + + // перегородка поля горизонтальная + DelField2(); + + // ячейки игрового поля + GameFields(); + + // фишки + Chips(); + + SetColor(45); + ChangeFont(); + OutTextXY(960, 50, 'The first player is going'); + + // конец основной программы + readkey(); + closeGraph(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/main_project/Jumanji_v.2.0.pas b/victoria.binkovskaya/main_project/Jumanji_v.2.0.pas new file mode 100644 index 0000000..f6e90e2 --- /dev/null +++ b/victoria.binkovskaya/main_project/Jumanji_v.2.0.pas @@ -0,0 +1,282 @@ +program project_jumanji; + +uses + wingraph, wincrt; + +const + // значение - номера цветов + BG_COLOR = $50AF4C; + MAIN_FIELD_COLOR = $4AC38B; + GAME_FIELDS_COLOR = $7A40EC; + GAME_LINES_COLOR = $889600; + CENTRAL_ELLIPSE_COLOR = $4370FF; + TEXT_COLOR = $FFFFFF; + FIRST_CHIP_COLOR = $4DB7FF; + SECOND_CHIP_COLOR = $DAC626; + + // значение - ширина рамок в пикселях + MAIN_FIELD = 30; + + // размер шрифта + FONT_SIZE = 22; + + //количество строк в текстовом поле + QUANTITY_OF_STRINGS = 5; + + // значение - количество ячеек игрового поля + NUMBER_OF_LOCATIONS = 2; + +type + TLocation = record + x, y: Integer; + nextLocation1: Integer; + nextLocation2: Integer; + + eventStr: array [1..QUANTITY_OF_STRINGS] of String; + eventLocation: Integer; + loseTurn: Boolean; + end; + +var + gm, gd: SmallInt; + + Locations: array [1..NUMBER_OF_LOCATIONS] of TLocation; + +// фон +procedure BGround(); + var + Color: Longword; + + begin + Color := BG_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar(0, 0, GetMaxX, GetMaxY); + end; + +// основное игровое поле +procedure MField(); + var + Color: Longword; + + begin + Color := MAIN_FIELD_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar(0 + MAIN_FIELD, 0 + MAIN_FIELD, GetMaxX - MAIN_FIELD, GetMaxY - MAIN_FIELD); + end; + +// поле для вывода кубиков (прямоугольник в нижнем правом углу) +procedure DiceField(); + var + Color: Longword; + + begin + Color := BG_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar((GetMaxX - (GetMaxX div 6)), (GetMaxY - (GetMaxY div 6)), GetMaxX, GetMaxY); + end; + +//центральный овал (с выводом текста) +procedure CentralEllipse(); + var + Color: Longword; + + begin + Color := CENTRAL_ELLIPSE_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + FillEllipse((GetMaxX div 2), (GetMaxY div 2), 150, 120); + end; + +// текстовое поле +procedure WriteText(st: array of string); + var + i: Integer; + + begin + for i := 0 to length(st) - 1 do + begin + SetColor(TEXT_COLOR); + OutTextXY(((GetMaxX div 2) - 100), (((GetMaxY div 2) + i * 30) - 75), st[i]); + end; + end; + +// // кубики +// procedure Dice(); + +// ячейки игрового поля +procedure GameFields(); + var + Color, LineColor: Longword; + x1, x2, y1, y2: Integer; + i: Integer; + + NextLocation: Integer; + + begin + Color := GAME_FIELDS_COLOR; + SetColor(Color); + SetFillStyle(solidfill, Color); + + LineColor := GAME_LINES_COLOR; + SetColor(LineColor); + SetLineStyle(solidln, 0, 3); + + for i := 1 to NUMBER_OF_LOCATIONS do + begin + x1 := Locations[i].x + 15; + y1 := Locations[i].y + 15; + + NextLocation := Locations[i].NextLocation1; + if ( NextLocation <> 0) then + begin + x2 := Locations[NextLocation].x + 15; + y2 := Locations[NextLocation].y + 15; + line(x1, y1, x2, y2); + end; + + NextLocation := Locations[i].NextLocation2; + if ( NextLocation <> 0) then + begin + x2 := Locations[NextLocation].x + 15; + y2 := Locations[NextLocation].y + 15; + line(x1, y1, x2, y2); + end; + end; + + for i := 1 to NUMBER_OF_LOCATIONS do + begin + x1 := Locations[i].x; + y1 := Locations[i].y; + x2 := Locations[i].x + 30; + y2 := Locations[i].y + 30; + Bar(x1, y1, x2, y2); + end; + end; + +// передвижение фишек +// procedure ClearChips(); +// var +// Color: Longword; + +// begin +// Color := GAME_FIELDS_COLOR; +// SetColor(Color); +// SetFillStyle(solidfill, Color); +// FillEllipse(65, 675, 10, 10); +// delay(40); +// end; + +// фишки +procedure Chips(); + var + Color: Longword; + + begin + Color := FIRST_CHIP_COLOR; + SetColor(Color); + SetFillStyle(solidfill, Color); + FillEllipse(65, 675, 10, 10); + + delay(500); + + SetColor(GAME_FIELDS_COLOR); + SetFillStyle(solidfill, GAME_FIELDS_COLOR); + FillEllipse(65, 675, 10, 10); + + delay(500); + + SetColor(Color); + SetFillStyle(solidfill, Color); + FillEllipse(135, 565, 10, 10); + + // Color := SECOND_CHIP_COLOR; + // SetColor(Color); + // SetFillStyle(solidfill, Color); + // FillEllipse(95, 675, 10, 10); + + // ClearChips(); + end; + +// изменение стандартного шрифта и его размера +procedure ChangeFont; + var + font: Smallint; + + begin + font := InstallUserFont('Verdana'); + if (font < 0) then + Exit; + SetTextStyle(font, HorizDir, FONT_SIZE); + end; + +// начало основной программы +begin + + // инициализация графического режима + gd := NoPalette; + gm := mMaximized; + InitGraph(gd,gm, ''); + + // SetActivePage(0); + + // описание игровых ячеек + Locations[1].x := 50; + Locations[1].y := 660; + Locations[1].nextLocation1 := 2; + Locations[1].nextLocation2 := 0; + Locations[1].eventStr[1] := 'Line1'; + Locations[1].eventStr[2] := 'Line2'; + Locations[1].eventStr[3] := 'Line3'; + Locations[1].eventStr[4] := 'Line4'; + Locations[1].eventStr[5] := 'Line5'; + + Locations[2].x := 120; + Locations[2].y := 550; + // Locations[2].nextLocation1 := 3; + // Locations[2].nextLocation2 := 4; + + // Locations[3].x := 170; + // Locations[3].y := 560; + + // Locations[4].x := 170; + // Locations[4].y := 600; + // Locations[4].nextLocation1 := 1; + // Locations[4].nextLocation2 := 0; + + // основной фон + BGround(); + + // внутренний фон + MField(); + + // поле для игральных кубиков + DiceField(); + + // центральный рисунок игрового поля - подложка для текста + CentralEllipse(); + + // ячейки игрового поля + GameFields(); + + ChangeFont(); + WriteText(Locations[1].eventStr); + + // фишки + Chips(); + + // SetVisualPage(1); + // спросить у пользов, что он хочет делать + // обработка запроса пользователя + // заново нарисовать + + // конец основной программы + readkey(); + closeGraph(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/main_project/Jumanji_v.3.0.pas b/victoria.binkovskaya/main_project/Jumanji_v.3.0.pas new file mode 100644 index 0000000..c5d4df0 --- /dev/null +++ b/victoria.binkovskaya/main_project/Jumanji_v.3.0.pas @@ -0,0 +1,310 @@ +program project_jumanji; + +uses + wingraph, wincrt; + +const + // значение - номера цветов + BG_COLOR = $50AF4C; + MAIN_FIELD_COLOR = $4AC38B; + GAME_FIELDS_COLOR = $7A40EC; + GAME_LINES_COLOR = $889600; + CENTRAL_ELLIPSE_COLOR = $4370FF; + TEXT_COLOR = $FFFFFF; + FIRST_CHIP_COLOR = $4DB7FF; + SECOND_CHIP_COLOR = $DAC626; + + // значение - ширина рамок в пикселях + MAIN_FIELD = 30; + + // размер шрифта + FONT_SIZE = 22; + + //количество строк в текстовом поле + QUANTITY_OF_STRINGS = 5; + + // значение - количество ячеек игрового поля + NUMBER_OF_LOCATIONS = 4; + +type + TLocation = record + x, y: Integer; + nextLocation1: Integer; + nextLocation2: Integer; + + eventStr: array [1..QUANTITY_OF_STRINGS] of String; + eventLocation: Integer; + loseTurn: Boolean; + end; + +var + gm, gd: SmallInt; + activePage: Integer; + + // размещение фишки + chipLocation: Integer; + newChipLocation: Integer; + + Locations: array [1..NUMBER_OF_LOCATIONS] of TLocation; + +// фон +procedure BGround(); + var + Color: Longword; + + begin + Color := BG_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar(0, 0, GetMaxX, GetMaxY); + end; + +// основное игровое поле +procedure MField(); + var + Color: Longword; + + begin + Color := MAIN_FIELD_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar(0 + MAIN_FIELD, 0 + MAIN_FIELD, GetMaxX - MAIN_FIELD, GetMaxY - MAIN_FIELD); + end; + +// поле для вывода кубиков (прямоугольник в нижнем правом углу) +procedure DiceField(); + var + Color: Longword; + + begin + Color := BG_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar((GetMaxX - (GetMaxX div 6)), (GetMaxY - (GetMaxY div 6)), GetMaxX, GetMaxY); + end; + +//центральный овал (с выводом текста) +procedure CentralEllipse(); + var + Color: Longword; + + begin + Color := CENTRAL_ELLIPSE_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + FillEllipse((GetMaxX div 2), (GetMaxY div 2), 150, 120); + end; + +// текстовое поле +procedure WriteText(st: array of string); + var + i: Integer; + + begin + for i := 0 to length(st) - 1 do + begin + SetColor(TEXT_COLOR); + OutTextXY(((GetMaxX div 2) - 100), (((GetMaxY div 2) + i * 30) - 75), st[i]); + end; + end; + +// // кубики +// procedure Dice(); + +// ячейки игрового поля +procedure GameFields(); + var + Color, LineColor: Longword; + x1, x2, y1, y2: Integer; + i: Integer; + + NextLocation: Integer; + + begin + Color := GAME_FIELDS_COLOR; + SetColor(Color); + SetFillStyle(solidfill, Color); + + LineColor := GAME_LINES_COLOR; + SetColor(LineColor); + SetLineStyle(solidln, 0, 3); + + for i := 1 to NUMBER_OF_LOCATIONS do + begin + x1 := Locations[i].x + 15; + y1 := Locations[i].y + 15; + + NextLocation := Locations[i].NextLocation1; + if ( NextLocation <> 0) then + begin + x2 := Locations[NextLocation].x + 15; + y2 := Locations[NextLocation].y + 15; + line(x1, y1, x2, y2); + end; + + NextLocation := Locations[i].NextLocation2; + if ( NextLocation <> 0) then + begin + x2 := Locations[NextLocation].x + 15; + y2 := Locations[NextLocation].y + 15; + line(x1, y1, x2, y2); + end; + end; + + for i := 1 to NUMBER_OF_LOCATIONS do + begin + x1 := Locations[i].x; + y1 := Locations[i].y; + x2 := Locations[i].x + 30; + y2 := Locations[i].y + 30; + Bar(x1, y1, x2, y2); + end; + end; + +// описание ячееек игрового поля +procedure LocationsDescription(); + begin + Locations[1].x := 50; + Locations[1].y := 660; + Locations[1].nextLocation1 := 2; + Locations[1].nextLocation2 := 0; + Locations[1].eventStr[1] := 'Line1'; + Locations[1].eventStr[2] := 'Line2'; + Locations[1].eventStr[3] := 'Line3'; + Locations[1].eventStr[4] := 'Line4'; + Locations[1].eventStr[5] := 'Line5'; + + Locations[2].x := 120; + Locations[2].y := 550; + Locations[2].nextLocation1 := 3; + Locations[2].nextLocation2 := 0; + + Locations[3].x := 210; + Locations[3].y := 600; + Locations[3].nextLocation1 := 4; + Locations[3].nextLocation2 := 0; + + Locations[4].x := 270; + Locations[4].y := 560; + // Locations[4].nextLocation1 := 1; + // Locations[4].nextLocation2 := 0; + end; + +// фишки +procedure Chips(); + var + Color: Longword; + chipX,chipY: Integer; + + begin + chipX := Locations[chipLocation].x + 15; + chipY := Locations[chipLocation].y + 15; + + Color := FIRST_CHIP_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + FillEllipse(chipX, chipY, 10, 10); + end; + +// изменение стандартного шрифта и его размера +procedure ChangeFont; + var + font: Smallint; + + begin + font := InstallUserFont('Verdana'); + if (font < 0) then + Exit; + SetTextStyle(font, HorizDir, FONT_SIZE); + end; + +// начало основной программы +begin + + // инициализация графического режима + gd := NoPalette; + gm := mMaximized; + InitGraph(gd,gm, ''); + + activePage := 0; + chipLocation := 1; + + while not keypressed do + begin + SetActivePage(activePage); + ClearDevice(); + // описание игровых ячеек + + // основной фон + BGround(); + + // внутренний фон + MField(); + + // поле для игральных кубиков + DiceField(); + + // центральный рисунок игрового поля - подложка для текста + CentralEllipse(); + + // ячейки игрового поля + GameFields(); + + // описание ячеек + LocationsDescription(); + + ChangeFont(); + WriteText(Locations[1].eventStr); + + // фишки + Chips(); + + SetVisualPage(activePage); + delay(500); + + // основной фон + BGround(); + + // внутренний фон + MField(); + + // поле для игральных кубиков + DiceField(); + + // центральный рисунок игрового поля - подложка для текста + CentralEllipse(); + + // ячейки игрового поля + GameFields(); + + // описание ячеек + LocationsDescription(); + + ChangeFont(); + WriteText(Locations[1].eventStr); + + // фишки + Chips(); + + newChipLocation := Locations[chipLocation].nextLocation1; + chipLocation := newChipLocation; + + if activePage = 1 then + begin + activePage := 0; + end + else + begin + activePage := 1; + end; + + // конец основной программы + end; + readkey(); + closeGraph(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/main_project/Jumanji_v.4.0.pas b/victoria.binkovskaya/main_project/Jumanji_v.4.0.pas new file mode 100644 index 0000000..2465d33 --- /dev/null +++ b/victoria.binkovskaya/main_project/Jumanji_v.4.0.pas @@ -0,0 +1,337 @@ +program project_jumanji; + +uses + wingraph, wincrt; + +const + // значение - номера цветов + BG_COLOR = $50AF4C; + MAIN_FIELD_COLOR = $4AC38B; + GAME_FIELDS_COLOR = $7A40EC; + GAME_LINES_COLOR = $889600; + CENTRAL_ELLIPSE_COLOR = $4370FF; + TEXT_COLOR = $FFFFFF; + FIRST_CHIP_COLOR = $4DB7FF; + SECOND_CHIP_COLOR = $DAC626; + + // значение - ширина рамок в пикселях + MAIN_FIELD = 30; + + // размер шрифта + FONT_SIZE = 22; + + //количество строк в текстовом поле + QUANTITY_OF_STRINGS = 5; + + // значение - количество ячеек игрового поля + NUMBER_OF_LOCATIONS = 4; + +type + TLocation = record + x, y: Integer; + nextLocation1: Integer; + nextLocation2: Integer; + + eventStr: array [1..QUANTITY_OF_STRINGS] of String; + eventLocation: Integer; + loseTurn: Boolean; + end; + +var + gm, gd: SmallInt; + activePage: Integer; + key: Char; + + // размещение фишки + chipLocation: Integer; + newChipLocation: Integer; + + Locations: array [1..NUMBER_OF_LOCATIONS] of TLocation; + +// фон +procedure BGround(); + var + Color: Longword; + + begin + Color := BG_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar(0, 0, GetMaxX, GetMaxY); + end; + +// основное игровое поле +procedure MField(); + var + Color: Longword; + + begin + Color := MAIN_FIELD_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar(0 + MAIN_FIELD, 0 + MAIN_FIELD, GetMaxX - MAIN_FIELD, GetMaxY - MAIN_FIELD); + end; + +// поле для вывода кубиков (прямоугольник в нижнем правом углу) +procedure DiceField(); + var + Color: Longword; + + begin + Color := BG_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + Bar((GetMaxX - (GetMaxX div 6)), (GetMaxY - (GetMaxY div 6)), GetMaxX, GetMaxY); + end; + +//центральный овал (с выводом текста) +procedure CentralEllipse(); + var + Color: Longword; + + begin + Color := CENTRAL_ELLIPSE_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + FillEllipse((GetMaxX div 2), (GetMaxY div 2), 150, 120); + end; + +// текстовое поле +procedure WriteText(st: array of string); + var + i: Integer; + + begin + for i := 0 to length(st) - 1 do + begin + SetColor(TEXT_COLOR); + OutTextXY(((GetMaxX div 2) - 100), (((GetMaxY div 2) + i * 30) - 75), st[i]); + end; + end; + +// // кубики +// procedure Dice(); + +// ячейки игрового поля +procedure GameFields(); + var + Color, LineColor: Longword; + x1, x2, y1, y2: Integer; + i: Integer; + + NextLocation: Integer; + + begin + Color := GAME_FIELDS_COLOR; + SetColor(Color); + SetFillStyle(solidfill, Color); + + LineColor := GAME_LINES_COLOR; + SetColor(LineColor); + SetLineStyle(solidln, 0, 3); + + for i := 1 to NUMBER_OF_LOCATIONS do + begin + x1 := Locations[i].x + 15; + y1 := Locations[i].y + 15; + + NextLocation := Locations[i].NextLocation1; + if ( NextLocation <> 0) then + begin + x2 := Locations[NextLocation].x + 15; + y2 := Locations[NextLocation].y + 15; + line(x1, y1, x2, y2); + end; + + NextLocation := Locations[i].NextLocation2; + if ( NextLocation <> 0) then + begin + x2 := Locations[NextLocation].x + 15; + y2 := Locations[NextLocation].y + 15; + line(x1, y1, x2, y2); + end; + end; + + for i := 1 to NUMBER_OF_LOCATIONS do + begin + x1 := Locations[i].x; + y1 := Locations[i].y; + x2 := Locations[i].x + 30; + y2 := Locations[i].y + 30; + Bar(x1, y1, x2, y2); + end; + end; + +// описание ячееек игрового поля +procedure LocationsDescription(); + begin + Locations[1].x := 50; + Locations[1].y := 660; + Locations[1].nextLocation1 := 2; + Locations[1].nextLocation2 := 0; + Locations[1].eventStr[1] := 'Line1'; + Locations[1].eventStr[2] := 'Line2'; + Locations[1].eventStr[3] := 'Line3'; + Locations[1].eventStr[4] := 'Line4'; + Locations[1].eventStr[5] := 'Line5'; + + Locations[2].x := 120; + Locations[2].y := 550; + Locations[2].nextLocation1 := 3; + Locations[2].nextLocation2 := 0; + + Locations[3].x := 210; + Locations[3].y := 600; + Locations[3].nextLocation1 := 4; + Locations[3].nextLocation2 := 0; + + Locations[4].x := 270; + Locations[4].y := 560; + // Locations[4].nextLocation1 := 1; + // Locations[4].nextLocation2 := 0; + end; + +// фишки +procedure Chips(); + var + Color: Longword; + chipX,chipY: Integer; + + begin + chipX := Locations[chipLocation].x + 15; + chipY := Locations[chipLocation].y + 15; + + Color := FIRST_CHIP_COLOR; + + SetColor(Color); + SetFillStyle(solidfill, Color); + FillEllipse(chipX, chipY, 10, 10); + end; + +// движение фишки по первому пути +procedure MoveToFirstWay(); + begin + newChipLocation := Locations[chipLocation].nextLocation1; + chipLocation := newChipLocation; + end; + +// движение фишки по второму пути +procedure MoveToSecondWay(); + begin + // newChipLocation := Locations[chipLocation].nextLocation2; + // chipLocation := newChipLocation; + if Locations[chipLocation].nextLocation2 = 0 then + begin + MoveToFirstWay(); + end; + end; + +// изменение стандартного шрифта и его размера +procedure ChangeFont(); + var + font: Smallint; + + begin + font := InstallUserFont('Verdana'); + if (font < 0) then + Exit; + SetTextStyle(font, HorizDir, FONT_SIZE); + end; + +// рисуем все элементы +procedure DrawAllElements(); + begin + SetActivePage(activePage); + ClearDevice(); + + // инициализация положения игровых ячеек + LocationsDescription(); + + // основной фон + BGround(); + + // внутренний фон + MField(); + + // поле для игральных кубиков + DiceField(); + + // центральный рисунок игрового поля - подложка для текста + CentralEllipse(); + + // ячейки игрового поля + GameFields(); + + // фишки + Chips(); + + // изменение шрифта + ChangeFont(); + + // вывод текста о событии + WriteText(Locations[1].eventStr); + + // момент перемены картинки на экране + SetVisualPage(activePage); + delay(500); + + // перемена страниц + if activePage = 1 then + begin + activePage := 0; + end + else + begin + activePage := 1; + end; + end; + + +// начало основной программы +begin + // инициализация графического режима + gd := NoPalette; + gm := mMaximized; + InitGraph(gd,gm, ''); + + // инициализация переменных + activePage := 0; + chipLocation := 1; + key:= 'a'; + + // основной игровой цикл + while key <> 'q' do + begin + // рисуем все элементы + DrawAllElements(); + + // считывание клавиши и обрабатывание нажатия + key := readkey; + + case key of + 'w': MoveToFirstWay; + 'd': MoveToSecondWay; + chr(0): + begin + key := readkey; + case ord(key) of + 72: MoveToFirstWay; + 77: MoveToSecondWay; + end; + end; + 'q': break; + else + continue; + end; + + // конец основной программы + end; + + readkey(); + // закрытие графического режима + closeGraph(); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/main_project/wincrt.o b/victoria.binkovskaya/main_project/wincrt.o new file mode 100644 index 0000000..ef12aa6 Binary files /dev/null and b/victoria.binkovskaya/main_project/wincrt.o differ diff --git a/victoria.binkovskaya/main_project/wincrt.ppu b/victoria.binkovskaya/main_project/wincrt.ppu new file mode 100644 index 0000000..e381a96 Binary files /dev/null and b/victoria.binkovskaya/main_project/wincrt.ppu differ diff --git a/victoria.binkovskaya/main_project/wingraph.o b/victoria.binkovskaya/main_project/wingraph.o new file mode 100644 index 0000000..349ebf3 Binary files /dev/null and b/victoria.binkovskaya/main_project/wingraph.o differ diff --git a/victoria.binkovskaya/main_project/wingraph.ppu b/victoria.binkovskaya/main_project/wingraph.ppu new file mode 100644 index 0000000..9bdc7ce Binary files /dev/null and b/victoria.binkovskaya/main_project/wingraph.ppu differ diff --git a/victoria.binkovskaya/project/Everest.pas b/victoria.binkovskaya/project/Everest.pas new file mode 100644 index 0000000..0177d89 --- /dev/null +++ b/victoria.binkovskaya/project/Everest.pas @@ -0,0 +1,1006 @@ +program everest; +uses uniconsole; + +var + height: Integer; + time: Integer; + endurance: Integer; + + food: Integer; + water: Integer; + oxygen: Integer; + dynamite: Integer; + rope: Integer; + flashlight: Integer; + radio: Integer; + umbrella: Integer; + + player: String; + +procedure Equip(); + var + i: Integer; + equipment: Integer; + + begin + for i := 1 to 5 do + begin + writeln(i, ' предмет'); + writeln(); + + readln(equipment); + + case equipment of + 1: + begin + food := food + 3; + end; + 2: + begin + water := water + 2; + end; + 3: + begin + oxygen := oxygen + 2; + end; + 4: + begin + dynamite := dynamite + 1; + end; + 5: + begin + rope := rope + 1; + end; + 6: + begin + flashlight := flashlight + 1; + end; + 7: + begin + radio := radio + 1; + end; + 8: + begin + umbrella := umbrella + 1; + end + else + begin + writeln(player, ', нет тут такого варианта :Р') ; + continue; + end; + end; + end; + end; + +procedure WinOrLose(s: String); + var + i, l: Integer; + us: String; + + begin + i := 1; + l := Length(s); + while i <= l do + begin + if (ord(s[i]) < 128) then + begin + write(s[i]); + end + else + begin + us := s[i] + s[i+1]; + write(us); + + i := i + 1; + end; + + i := i + 1; + delay(50); + end; + writeln; + end; + +procedure Meteorite_shower(); + var + choise: Integer; + + begin + writeln(); + writeln(); + writeln(); + writeln(' ...,.. .,,,***,,.,,,,,,,,,,.. .*,,,,............ . '); + writeln(' .. .(&**. .,,***,,,../&/**/((/,.... ./@&/,.......... '); + writeln(' ,&(*. .,/***,,,. .*@@@&&&(,,. ...,,,,......... '); + writeln(' .. ..,*##,,.. .....,**,,.... . ..(,.......... ..'); + writeln(' ./(/ . .,,,,**,,,. ..... . .. ............ ....... ....,,'); + writeln(' . ,#&//**,,. ...... ... .. ........... .*(*.,**,,,,,,...'); + writeln(' &, ,@@&/,,......... ....... ....,*,...... .*%/#**,,.. .'); + writeln(' .,#&,,,.,............... .......,*,... ./%(*....... '); + writeln(' .. ..,,,.,......*#/,,,. ................ .,,,,,..,,....'); + writeln(' (*, .. .,,.........,***,,................ ..../,,,.......'); + writeln(' ,(*, ...,,,,,,..,..*****,,............... ......,,,,,........'); + writeln(' ./#. ..,,,,**,/#***/(///,,............... .......,..,.......... '); + writeln(' ..,,*****,***/#&&%%(/,......,,,...... .. .......,,.,.......,..... '); + writeln(' ..,,**********//(((#(/*,,,,,,,,,,,... ..........,,/*,,,,......,,... '); + writeln(' .,,**///***//(((((((/**,,,,,**,,,,,... ..............,,*&@**,....,,.... ....'); + writeln(' .,,**/((/////(#%%###(///*******,,,,,... .....,.........,,,,,,****,,,.... ......... '); + writeln(' .../,....,,**/((##(/#(######(((///*////****,,....,,,***,,.......,,,,,..,***(*,.. .,,.,,.,.. '); + writeln(' .,,. .%&,.,**//(((#((#(########(#(///(((/(/(**,..,,,*&(//*,,,*,,,,,,,,/,.,,*%%/,.. ..,(@&*.. '); + writeln('.... ./* .**(##((((((#&%#####(###(((((((/////*********//#%/*****##*,,...,,,...........,,,....... '); + writeln(',,,,,,....... .*(&%(/(((((%@%###(#@%#((((((////*****///((((/**********,,,,,,,,... ..,,,.. .....'); + writeln('/////****,,,,,,....... .*(&&%#(((/(%##((##%%###((((///(/***//(#((((//////*****,,,**,,.........,,... ... ...,.. '); + writeln('//((((((((////****,,,,,...... ,*. ..*%%#@#(////*((%#&%#(((#(((#(////////((((////((/(%/**,,,,,,,......,,,,.. .... ...... .....'); + writeln('*******///(((((((((///****,,,,......... ,&@%(/**,*,**//((((#((#/((/((#(//(/(((//(((/(///***,,,,,.................. .*%*,........ '); + writeln(',,,,,,********/////((((((((///****,,,,..... ./@&&*(,,,/**/(((#(((##/(((///(((/////((((((//***,,,,..,,............ .. ,%&/*,... '); + writeln(',,,,.....,,,**********/////((((((((//****,,,,..... ,%@&%(/,****#//#((##(#%(/#(/(//((((((#(((///***,,,,,,,....**,... /, .,&@%* '); + writeln('...,,,,,,,,,,,,,,****/*****////////((((((///****,,,,..... ./@@(%#(/((*//(((#((/##///*///(((((///////***/*,,,,.......,,*....,.. '); + writeln('....................,,,,,,,*********//////((((((///***,,,,..,/@%((*,*/,****/(//////*/////(((((////**//*/**,,,..... .,%(. .*,. . '); + writeln('..,,,........,.....................,,*****//////((((((///****/&&(*,(*(*/,**(%/////////(((((#(////(#//**,,,,,.. ...,,,. '); + writeln(' .,,..................................,,**//(((((((((((((%@%(,.#/**,***/*%////#***/*((((##//***/,,,..... .,,. ,(*,.'); + writeln(' . .. ....... ...............................,/(/*////(/((((#&%&(%(##/****/%##**,#(/(((((////**,,,... ,#,/ . ..*&@%#/ '); + writeln(' .. . ........... ......................,,**///(//#@&@@@@@&@#%((*/#/*(*(/#/////***,,.. . .......,,,,,*//**'); + writeln(' . . ......... ...........................,,**///#&@&&%%(((%&&/#//#%%*#%/**(,*. / , ..*****,,,,,,,,,....'); + writeln(' ...... .. ........... ... ....................,,,,**(#&&&&%#&%&@&&@&%%&&&*,... .... ./,.... ./#%*///,,,....... '); + writeln(' ..............,..................................,,,***//#%%#####%%%###((//**,,...(,. ,(&*,. .*&@%*****,... '); + writeln(' . . .. .. .,(,....... ...................,,,,,,,**////(#%%@%(#((//**,,,... .,,. *, .*(#(/*. '); + writeln(' ..... .... ....... . ....... ................................,,,,**/((#%%%%%%((///**,,...... '); + writeln(' . . ........,..,,,,,,,......,.......... ............,......,,.,.......,,,**(###%#%&%##((//**,,,.... . '); + writeln(' ............,,....,..,,.. .................................................,,**%&&&&%&%%##((//***,,,... . '); + writeln('.. ............... ........,,.,,,,,.......,,,,,,,.,.....,....,..,,,,**,,,...............,,,*/%(%%%%&&%%%&(,//**/%*,... .#/*.. .#/.. '); + writeln(' .........................,.......,......,,,,,,*,*,,.....,,***,.,**/#/,.,*,.,,,.............,,,,,**/#%%%&&&%%#(((//*,,... .*((, ,. '); + writeln(' ...................,,,,,....,,...,.,,,.,,,,,,**,,.,**,... .,,,.....,........,..,,..........,,,,***/(###%%%%%##(//**,,,.. .. '); + writeln(' ....................,,,.,,..........,,,,,,,....,,,,***,,,.,,***,*,,*,,.......*(/*,...../%,,,.,,*(&//(###%%%##((((#*,,........ '); + writeln(' ....................,..................,...... . .,,,,*********,,**//,...,,......,##((/*....,....,***/*/(#####%%%##(/**,,..,&(. '); + writeln(' ............ .... ................,,,.,,,,,.... .,,,,,**//*,,*,******,,.,,,,.....,((((((,.......,,****/&((####%%%#(//**,,... '); + writeln(' . ....... ... .... .. .....,,,...,.,..,,,,,.,. ...,..,.,.,,,,,*,,,,,,..,,..,###(((##/......,,,*,,***((#%##%###(//**,... '); + writeln(' .. ...... . ........... ....,.,.,,,,,,,,,,,,,,,*..,**,,,,,,,,,*****,,,*,.,..,...,...,((#/*###(*,,,....,,**,/((#########(//**,,.. '); + writeln(' ........ ... ...... ........,,,,..,,,*,,,,....,,*,.,,,,*,,,****,*...,..,**,,,,.,,,,/(/(#(((,.,,.,,***/((((##((####((//**,,.. '); + writeln(' ................................,,.....,,,,,*,,..,,.,,,,,*,*,**********,....,,,,,,,,,,,,*((*/(((#,,...,,//(((((###((####((//**,,.. '); + writeln(' .. ............. .....,,.. .,.. .,,. .,,*,,,,...,*,,.,*,,,*,*,,,***,,***,,,,,,,,***/,,,,,*(#(/####/,..,,,//////(####((####((//**,,.. '); + writeln(' . ......... ...... ........,. ., ...,,..,,..*, ,.*,,,.,,,,,,********,,*,,,,,**,,****(/((#########(,,,/(//*/#%%%%%#(####((//*,,.. '); + writeln(' . .... ..... ..... .......,,. ., .. ..,......,,..,,,*,,,,,,.,,*,**,,******,.,*//(((((/((#(#########(#,*##%#/#%%%%%%#((((##((/**,.. '); + writeln(' . . . ... . . .. . .. .,, . ., ,..,. . ..,..,,,.,.,,*******,,,....*/////(((((/*/*(((((#(######%/,/(%%%%%%%%%%%#(((/(##(/**,,.. '); + writeln(' . ., .,. .., ., .. .. .. .. . .,.,.,,..... ...,....,,,,,,****,,,,,****////(((((/((((#(((((#######/*/##%%%#%%%%%##(////(((//**,,.. '); + writeln(); + writeln(); + writeln(); + + writeln(player,', внезапно небо потемнело, сгустились тучи и начался метеоритный дождь.'); + writeln(); + writeln('Варианты развития:'); + writeln('1. Спрятаться под выступом из скалы;'); + writeln('2. Использовать сверхпрочный зонт;'); + + readln(choise); + + case choise of + 1: + begin + time := time + 1; + height := height; + endurance := endurance; + writeln('Много лишнего времени? Ну ок, прячься'); + end; + 2: + begin + if umbrella >= 1 then + begin + time := time + 1; + height := height + 1000; + umbrella := umbrella - 1; + endurance := endurance - 100; + writeln('Полюбуйся-ка на эту красотищу, но не долго, нужно продолжать путь'); + end + else + begin + writeln('Да ты же не выбрал зонтик!'); + end; + end + else + begin + writeln(player,' не балуйся, нет здесь такого варианта'); + end; + end; + end; + +procedure Map(); + var + choise: Integer; + coin: Integer; + + begin + writeln(); + writeln(); + writeln(); + writeln('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'); + writeln('@@@@@@@@@#%///@(*/(%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@((**/@&&@@@@@@@@@@'); + writeln('@@@@@@@@@(,***/*,,,,#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///(**//******&@@@@@@@@@'); + writeln('@@@@@**((##(##((((///**,,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**/(((#((#####(((/*#@@@@@@'); + writeln('@@@@@(#(##%%%%%##(//***,,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/**///((##%###((//*/@@@@@@'); + writeln('@@@@@#((#%%&&&%%%#(//**,/&@&@@@@@@&@@@%/(*@@@%*///*,@##/*///////*&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&%%&(***//(##%%%%##(/**%@@@@@@'); + writeln('@@@@@&(###%&&&&%%#(((/*,.,**//(((//(((###(/((((((#(/((########(##(%@#/(*////*/((/(////////////(//(*&@@@******/////**,,/@@@@@@@/***///,,////(##%%%%%#(//*@@@@@@@'); + writeln('@@@@@&(###%&&&&%%%#(/(** ,*///((((//#((###(((####((/((####((####%#/&((#####(#####((/(//////*****,**/*,*******//*****,*,@(..,*,,,*,,**,**/((##%%%%%%##((*@@@@@@@'); + writeln('@@@@@@(##%%&&&&&%%#(((/,.,*/((##(#(/((###%####(((((#(##%###%##%%%%#####%%%##%%%%####(((((((/(//*,///**,*****,,*******,***,,,,,,*****,.*/(((#%%%&&%%##((/@@@@@@@'); + writeln('@@@@@@###%%&&&&&%##(((/,.*/((((((#####%#####%#%%#(##(#%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%#####(((#((///(///*/*,******//**,,,**********/***./((##%%%%&&&%###((@@@@@@@'); + writeln('@@@@@@###%%&&&&&%##(((/,.*/(((((##%####%%%#####%%##%(#%(%%%&%%%&%%%###%%#%%##%%%%%%%%%####(###((//(((/(//*,*/*//*/*,*******,****,,**,,/((###%%&&&%%%#((#@@@@@@@'); + writeln('@@@@@@###%%&&&&&&%(#(//..*/((((((####(##%%%%%%#%&%%%#%%%%%####%%%%%%%&%%&&%%%#%########(###(##(#(((#(////////*/*/((((//*//***,*,*****,*(###%%%&&&&&%##(%@@@@@@@'); + writeln('@@@@@@%##%%%&&&&%%#((//.,/(#(((###%##%###%%%%%&%#%%%((%%&&&&%%%%%#%%%%%%%%%%%#%%%####%#(##((###((/(###((((((#####(#(((((//*,***//////,*(##%%%%&&&&%%###&@@@@@@@'); + writeln('@@@@@@@%##%%%&&&&%##((/*.*//(((####%#%#%#%%%%%%%%(%%%##%%%&%%%%&%&%%##(((##(((#%&%%((#(##**(###((#####(((((((##/((((((/*//****,***/*,,,((#%%%%%&%%%%%(/@@@@@@@@'); + writeln('@@@@@@@##%&%&&&%%##///.*((((#(########%%%%%%%%#/%#/((%#%%&%%%%%%&((#####(/(#(((((&%##*((//(/((#(##(###(((#####((%##(#((//*//**,,,,,,,,,(((#%%%%&&%&%%#(@@@@@@@@'); + writeln('@@@@@@@##%%&&&%&%%#((*/.*(/(((((((###((#(#(##(((/#////(**(###%%##(((%%%%((/*(//(//%((((/((**//(#(#####%#(#/#(/#(#(#((((*((/*****,****,./(##%&&&&&&&%%%#@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&%%%##(/*./((((######(((###((##(*/(((((//(**,//*(**//#%#%#(#((//*((%(/(#/(//*(/*/(#(((######((#(#(#%####%#(((///****,,,*,/(#%%&&&&&&&%%%#@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&&%##(((*./#(#/*#(#(//(/(/((/(*//*(((((/(((%(////(/((%#(###((////(*#/*/*/(#////**/#(*((//(((#((((/#######(((((((/*///*,*.((#%&&&&&&&&&%%#@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&&%%#((/*./###(**/(///****/***///(#/*//((%%%%%##%#%#(%#,**/*/((//*/#/*//((#(//**/(*%*//*/((*/##(#######(####((((///(//,/*((#%%&&&&@&&%%##@@@@@@@@'); + writeln('@@@@@@@(%%%&&&&&%%%#(/*,/#((***/*(((((((//**//*/*/(/#((##%#(##(#####((((##(///(*/#((//((/#%#(*(*/*#(/*/(//*((*(#(##(#(#####(((((#(//*/*//###&&&@&&&%%##@@@@@@@@'); + writeln('@@@@@@@(#%%&%&&&%%##(/*,/(((***//((//**/***(/(,//////((/*(///(/(/(//*,,/#(#(/*,/%(//(((*/#((//(##(##//(*/#(#(/(*(##(/((##########((*/(*/((%%&&&&&&&%%##@@@@@@@@'); + writeln('@@@@@@@##%%&%&&&%%%#(/,,/#(#(,//**/(**((//*////****(/(/*(*///(((//(#//,#(#(//#/(##((#((/,,*****////(/(*(((((#((#(*((((/***/#///(/#(*//*/((%%%%&&&&%%%#%@@@@@@@@'); + writeln('@@@@@@@##%%%&&&%&%##(/,,*//(*,///,#((////*////**(//*/(((**(((##*///#((/(#/*/*//((/(#((((/(/***/,*//(//*/*/%#(#(((**#/##(*/////*******/*/(#%%&&&@&&&%%#%@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&%%%#((/.,(((#*,**/*/////******//*//***(/*/*#(//*##/##%%%(((*//#(#//((#//((//*/*(/(*((**#/***/((#/((***(*/////////*//(,**/(#%%&&&@&&&&%#%@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&&%%#/(/.*(#/#(***(((******(/**/(**#(////*//**/*,(/*##(((#//#%%/*/(((///*,,*,**//#%#%(///(/*//(//%##**(/(/(#((#//*((*,*///(##%&&&&&&&&%#&@@@@@@@@'); + writeln('@@@@@@@%%&&&&&&&%#(#(/.*#%(((/**,,*,,**/*/*////((#(*#/*(*/*///*(/(%%%(//#%%&%##%(/*/(#%#(*(((/**/((#(///((##/////,/#%%(/(####((#/*//*,*/#%%%&&&&&&&%%#&@@@@@@@@'); + writeln('@@@@@@@#%&&&&&&%%%###(.*(%#/(*(***,,*/*/*/((((/#/*/***/*#*(***,,***/*,*%#(/((####(%#///##(((/*((*(#%#(#%##%//(##(((/(#%###((#(///**,,*//#%%%%%%&&&%%#(@@@@@@@@@'); + writeln('@@@@@@@#%#%&&&&&%%###(.*(##(((*/(*,***(/(((##(*((((((((//***/(**//*/,/(#(/((&%(((#%%#((((#/(/(/(****#(##((####%####((*(/##((###(((//**,,##%%%%&&&&%%##@@@@@@@@@'); + writeln('@@@@@@@##%%&&&&&%%%%#(./(((#(#(*,*/*/**/(((#((*#(#(/*/#*//******/*/*//#(#%#%%%%#%%%(/((*,,##((/(*///(///#((/##((###((*(/((#(##(/((((#/**(##%%&&&&&&%%#@@@@@@@@@'); + writeln('@@@@@@@##%&&&&&%%%%%#(.*(((##/(*/**/*/(((/(##(#(((/*///(#///***(#///((/########%##(/(((##(*(/#/*/*(/*/*/*/,****,*(##/*///(##((#(#####(*/####%&&&&&&&&%@@@@@@@@@'); + writeln('@@@@@@@#%&&&&&&&&%%##(.*(((((((*****//(((##(##%%##((/,/(/((#(/*(/((//#/(######(#(((*(##%(#((##***/*((((/**,/((/*////,/(//(####((#%###(//(/#%%%&&&&&%%#@@@@@@@@@'); + writeln('@@@@@@@##%&&&@&&&%%##(.*/(//(/(,,*//(((((((#((###%%##(/**//(//**/*(////(////////(/#((##%%#(##((*,*((##(((#(#*,*,/(((*//*//##(((####((/*/((#%%&&&&&&%%#@@@@@@@@@'); + writeln('@@@@@@@#%%&&&@@&&%%#(/.*///*///(((/*(((((((//*(((#%%%##/####((#/(#/#*/(/(((*/***//(###%#####(((***((*#(#*((,*,,,*//*//**(#####(/(((#(/,/(##%%%&&&&%%%#@@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&&%%%#(/,*****/******/*//////(*////*/###(%%%%(((/*/(#((*(/((*/(///#%((%%########(**,*///(/##/****//**////((#((#(((((((/*,/(##%%&%&&&%%%#&@@@@@@@@'); + writeln('@@@@@@@(%%%&&&@&&&%#(/,,**/(*//,/******((*****,*,///*(##%%####(//#(/(((((*/***/(#/#((##(#(##((/*,**(//((((//**,**/*//(*##((((((((((//*,/(##%%%%&%&&%%#&@@@@@@@@'); + writeln('@@@@@@@##%%&&&&&&%#(((,,,**/(***/((*//*////(//(/*(*****(##(##(#%%#####/((#(#/(##%#(/(/(#(((((/**,,*/////((/*/(*//*/#//,*#((((((/////**,/((#%%&&&&%%%%#&@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&&&&%#((*,//**,*///((((((##//*///(**//*,,*/(###(((#%/(%%###%%%(##(((*/(#(#((/,,,/(#/,,,,,,****///(((#(,,**/*(/(((/(///*,,///#%%&%&&&&%%#%@@@@@@@@'); + writeln('@@@@@@@#%%&&&&&&&&%##(*,//**////((((#(#(((##/#((##**//*,*((###(((##((#(#%####((((((((((#((/*/((#(/*,*//((*(/(/#(((*(*,,,*,*,(////////*.//(##%%&&&&&%%##@@@@@@@@'); + writeln('@@@@@@@#%%%&&&&&&%%#((*.***///((((((((((((#/#**(**(((**/*#((#####(((/(####(((##(((/(((##((##/***,**((/((**(//(#((/////****,,*(///////*,/((#%#&&&&&&%%##@@@@@@@@'); + writeln('@@@@@@%%%&&&&&&%%#(/*.*//*/((((((((/*#((((**/(**//***/(#(((/(/(((/((((###((#(((((((((#(#(((/#(**//((/(*/((/#####(/(((*/****((*//*/**,///((#%%%%&&&%%%##@@@@@@@@'); + writeln('@@@@@@%#%%%&&&&%%%#(((/.,/(((((((/**#((((**///(**/**,*/(##((####(#(#((#########(((((((((//((#/(#/((((((#/(*/(#(##((///**/,/**((/,///**,*/(##%&&%&&%###(@@@@@@@@'); + writeln('@@@@@@#((#%%&&&%%%%#((/.,/(##(((((/(//*((((((*/(/,**//(((/((((((((#((#(#######//(((//(((//****((/###(/#(///(/(((((#/(**(/(**((/,,/*/**,//(#%%%&&&%%%##(@@@@@@@@'); + writeln('@@@@@@(##%%%&&%%%%%##(/.,(#%%#(/((((/(////((/((,*//((((//(/((((((/(((((((########(///(((//***//*(###(/*#/////(##/((//(#(/***/(/**/(/*,,/(/#%%&&&&&%%##(@@@@@@@@'); + writeln('@@@@@@(###%&&&&%%%###(/.,(#%###(((((((///(((/**//((((///(//(((((((((((((((#######(///////////////(((###((((((####(/((#((((//((###(((/,,/(((%%&&&&%%%%#(@@@@@@@@'); + writeln('@@@@@@/(##%&%&&&%%###(/.,/(#%#%%%%%%%%%%%######(((((/(((((#((#####(((##(###############(#######(((((((#%##%%%%%#%##########/(#%%#(((/,*(((#(%&&&&&%%%#(@@@@@@@@'); + writeln('@@@@@@/(###%&&%%%%###(/,.*(####%%%%%%%%%%##(#####(((((((((((##((###((##(#(####(####(#((###(%%%%%%%%##%%%%%%%%#######(####%%%%%%#(((/*,*((((##%&&&&&%###&@@@@@@@'); + writeln('@@@@@&/(##%%%&%%%%##(//,.*/(((((((((###%%#(((((((*@(((/(((/((/((((#(((((((((###((#(((((((((##%%###%##(#(##%#####(/((##########(###(/*,/((((%%&&&&&%%%##&@@@@@@@'); + writeln('@@@@@#/(##%%%&%%###((//,.,***////(////(((/(((((///@*/(/////////(/((/(((/(/(((((((((((((((((((/(((((((((((/(((//////(((((((((/((((((/,,*(((##%%&&&&%%####@@@@@@@'); + writeln('@@@@@(*/(#%%%%%%##(///*, ,////((/******////*,****@@@*/(((((((((((#((/(((#(#(##((((//(((((((/(@*((((((##((////*/////////////////////*,,*//(##%%%&&&&%####@@@@@@@'); + writeln('@@@@@**/(##%%%%##((//**,#/%%(#@((&/#(@@@@@@@@@@@@@@@@@@@@@@@@&@%%@@@@@%////@&&&*#%(/*(/(@@@**/////(##(/*/,(**#%**//(/*///*(%*/**.,*//////((#%%&&&&&%###(@@@@@@@'); + writeln('@@@@&**/(((###%#((///***&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@&.***/((#%%%&&%%#(((@@@@@@@'); + writeln('@@@@#*/((((####(((#((//*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#,***//((##%%%%##(#(&@@@@@@'); + writeln('@@@@@@@@/,*/*,,,,*(((*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%*(,**//((((((##//*#&@@@@@@'); + writeln('@@@@@@@@@/***///(//*&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**/*,,,,,**&@@@@@@@@@@'); + writeln('@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@%/#@@@@@@@@@@@@'); + writeln(); + writeln(); + writeln(); + + writeln(player,' ты увидел что-то в сугробе, присмотревшись обнаружил, что это карта, которая показывает как можно сократить путь'); + writeln(); + writeln('Варианты развития:'); + writeln('1. Использовать карту, подсветив фонариком;'); + writeln('2. Не использовать карту;'); + writeln('3. Подбросить монетку. "Орёл" - довериться карте, "решка" - пройти мимо сугроба;'); + + readln(choise); + + case choise of + 1: + begin + if flashlight >= 1 then + begin + time := time + 1; + height := height + 2000; // карта позволила пройти в два раза больше пути за один час + endurance := endurance + 100; + flashlight := flashlight - 1; + writeln('Оооо, да ты нашел карту оптимального пути и с её помощью проходишь за час в два раза больше пути, чем планировал'); + end + else + begin + writeln('Ты же не захотел брать фонарик!'); + end; + end; + 2: + begin + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + writeln('Хоть бы монетку подбросил... Ну иди по запланированному пути'); + end; + 3: + begin + coin := random(1) + 1; + if coin = 1 then + begin + writeln('"Орёл"! Ты доверился карте, иииии... тебе повезло! Ты прошел в два раза больше пути, за один час'); + time := time + 1; + height := height + 2000; + endurance := endurance + 100; + end + else + begin + writeln('"Решка"! Ты решил довериться монетке и пройти мимо сугроба с картой'); + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + end; + end + else + begin + writeln(player,' не балуйся, нет здесь такого варианта'); + end; + end; + end; + +procedure Cave(); + var + choise: Integer; + + begin + writeln(); + writeln(); + writeln(); + writeln(',,,***,,***,,,...,((/(////**,,*,,,,,,,,,*(#(#/((//(//**/*/**,**//*(/(//(****,,.,,,,.*,##,* ,**(/#/,/**,,***,**,/*,(**(##&&(*//(******,*/**,//*****//*//(/*#/((/'); + writeln('****,,*,,,,***,*,,,,,.,/#*****/*,,,,,,**,,*/#//((((/(*////*,**/******/,**/*///,.%..,(.*/(/,.*,(%#(//****/*,,,,***,*(#//%%//*(*,*/*,,***,***//*//**/(/(*//((#//('); + writeln(',,,,,,,,,,*(#//,,,,*,,,,,,,..****,****,,,**/*///(%/***//,,*,/**,*,*,,,,,,*,**(,,,....,,*,#(*.*,.(/*/*//******,,**/*%#%(//*****/,*****/**/***/*///(///((/#/###&&'); + writeln('**,**,*,,***,********,*,**,,,.....,*/******(###(//,.....,//*,,**,**,,,,,*,,,,,.,%&(%/.,.,,(/*,,,..*%***/**,,**/#((#(##%/(*,/*,***,**//*/*(***/***(((/(/(#######'); + writeln('**/**/*/****************,,,,**,,,,,......*, .....,/*,,,,,,,.,.......,,,**,,,.,,..,//,#(,(,,,/**,.,(*#(//((/*,*(%/(%#%%##**(**,**,**//*(//**//*//(//(//(/#(%/(#,'); + writeln('/////////////////*///**....****,**,,,,,,**.,,/,..(((/(*******,,,....... ...,,.,,,,..,......,/#,.,.*//*///,*###%#(##**//***,*,/**(((**/**////(((/(#/(#%#/#,*&&&&'); + writeln('*//(/(/(/(((/(((/////,...,,//******,*,**/*.,****//*%##/#((((((//******,,...........,,,,..,.,,,..,,**,,.**//##*(%%###(%/**/*,****/*/(/(//*///(///((#(#(#%((#%%/('); + writeln('*/(((/((((((((//((((/.....,,///********/*,.*****/.,(@/#((/((((((///(/***,*,,,,.. ... ...,,,,,,*,,,,.,,*.,((#(###(**#,*,***,*//***/*////%//###(/((((#%%%%*%%&&'); + writeln('/*(((((((/((((((((#*......,,.,*((//*,*(/.,//////.*/*.//*(((((////////*(/*/***,,*. .. ................. .,,.,,,*(###(/%/******,****/(*/#(///(#(/#/(%%(##/#%%%/#('); + writeln('*//((((#(#####%#/,...........***/((//((**/(////.*//.*//*//&%#/(((/((///////***,.. .....................,....,,,,,.,.,****,***,///(/((/(/(#(#%(##/%%(/#%%/##/*/%'); + writeln('//((//(#(##,,,,,,...,,....,,,,*(((((/*(((((/.,((..((((/////@#//(((///////...............,.,,,..,,,,..,,,,...*,*,,...*/,,**/,////*/***(####%*((%##/#%##%#*#%%/&&'); + writeln('//(/*,,***,*,*,.,,,,...,.,,*,,,,,*###(/(#(((/*/((/*/((//(((/////(#(////,,,,,......,.,,,,,,,.,..,,,,,,.,,,,....,,,,,..,*,,,,//////(#((#%(&&%(#%#%/#%%##%%(,//#&&'); + writeln('((/*//(((/*,*,,,,,..,,*,,,,,**,,,,,,,,**/////((((((((((((/////////&((////**/,,,,,.,,,,.,,,,,,,,,,,,,,,,,,,,,,,,....,,,*,,..*,,*(/((#(%##%%%#%(%%(#(##%##%%/*((/'); + writeln(',.,...,,,,,,,,,,,,,..,,,****,***,***,***/((((((((/////////////(//(((((((/*****/*,,*,,,,*,,,,*,,,,,,,,,,,,,,,.,,,,,....,,,*.....,,./##(#%%#(#%%%*%*##%#%%%*/((*('); + writeln('..,.,..,,,,,,,,,,,,*,,,**/***///****/**((#(###(#/**//(////((/////(/((#((/***////*//******,,,,,,*,,,,,,*,,,,,,,,,,,,,,.,...,,,......***(#&%#%%%/%#(%###%#/(((*(('); + writeln(',,,,,***,,,,*,,***,,*****,****,*****///###(((/****//((((#((/(((((((####//////(//***//((***/*,,,**,,,,****,,,,,,,,,,,,,,,,,,,,.,..,...,,*/###%#&&%###%%*//(/(//('); + writeln('*,,****,*,,,,,,,,,,******************/((((((****/***/((((#(#(#(/((##%%#(*//(((///*/((/////((/**,,,,,,*,,,,,,,,,**,,**,,,,,,,,,,,,,,.....,*,*,*%##%##(//(/(/#//('); + writeln('*//***,*,******,,****,************/(((///********,**/(#((#(###((/#(#%%#((/((#((///(#((((((///*,**((//**************,,,,*,,,,,,,,,,,,,,.,.....,,,**(/((,/(/(/##('); + writeln('***,,,,**,,,*****/*/***********/*/(//**,**,***/***/***(/##(#########%%%((/((#(*(((##((##(((((*.//(((*/((***,,****************,,,,,,,,,,,,,,,,,,,///#/(/(((###%#'); + writeln('*,********/*//***/*///////////(///****///(/**/****/*/////(#(###%#(###%%#(##%######%##%###(/##//#(###.((*,/(((/*******///*//*******//**,***((((*,,,*/(///((#(##('); + writeln('***/////((((////(//**////(/((((//**,***/*(///////*/*///////#(%##%%#%#%%%((#((###%&%%%%%%###%####%##,......,..*(###///(/(/////*(/,,,*,,,***((#(//*****///(///(*/'); + writeln('///**/**/****//*////((/**//***/////////(///**//*(((//*////(/(#%#%%##%#%%%##(#%#%%&%&&%&%%%%%%/%%,.......,.,.,,,/(*/#%/(((/(//*******,,,,,/####(////(##(*,/*****'); + writeln('/***/////*********//(//(((/**//((/(((/((/*(//(//(/(/(((/////((##%#%%(%%%%(##%#%%&&&&&&&&%%&%%(,,,...**,,,**,,,((#(/(/*,/*(#/(/(/*/****/*,/####(//(#%,,/(/**///*'); + writeln('////*////(//((((/*/**/((///((((/(((((((#((#(//((((/(/*/((//(*/(((##%%#%%%%%%#%%&@&@@@@&&%&&,,,,,.,.,*//*,*,****((#(/#*/#/(%#/((#((/(/(((#(/#%#%(#%,,,**(/#(#(/('); + writeln('((///(///(((((((//(((((((((((///* **...,,//##(#((//#((/(///(*////(#(###%%%#%%%&@@&@@@&&%@,,*,,,,,,,,,*(((*,****/*##(#/(/(##%(*##%%%(##(#%((/**,#%*,,,,/(#/###/('); + writeln('((((((//(#######(/#(#(####(#((((/.*/,,//*////((####(/(((#(/////*////##(##%%%&%@@@@@@@&&****,***,*,****/(#(/**/*///#((/((%%%&/#%%&&(%#%%&&(#*/**,*,,,*,*/(&%((&&'); + writeln('##########%%%%###(#(#((**((##(((..(*/////((((((((((#(#(((/(#((///(*///(######%@@@@@@@///*/*/***/*****//((#(***////##//(#%%&&/(%&&&&&&&&&%%%(///,***,*,,*/#&*#&&'); + writeln('#%##%#%##%%%%%######//,,,,*###..((/(((((((((#((((((//((##((((/(#((///*///((#((%%&@&**///(*///////*//****/##(///*//%#%#/#%%&%(&&@&&&&@@@&%//(((//******,**/%%//&'); + writeln('%%%%%%%%%%&%%#####*******,,*/(/***,*/(/(#(#(((((((//(/((((#((((((/(((/*/*#((((/////////////(///(///(/*//**/((//*/*/(%##(#%%%(&@%%&&@@&&%,*((#(((/********,(,/&&'); + writeln('&%%%%&&&%&%####(/*********/(///***/((##((/////////***,/((((#(((*/##%##(##(####((((//////((////((((///(////***////////%#/(#%#%&#&@&@&&**,/##/#(//*//*/**/*@%(,&&'); + writeln('%%%%%%%%%(%#%(/,******,**(,#*****(##(,*.,,*,,****//,*/*,/((((#(#*%%%%%%%%%%%######(((((*//(((((((/(((((((/(////***///(#((##(%&&%&&&@#&*/**/(##(#(/////*/**(@(&&'); + writeln('&&%&%%%#%%%(*,,******/((#(,***//#%***,****,../(************/((##%/%%&%&&%%&&%%%%%%###(((((((((##(//((#((##(((/////**//(##(#(#&&&&&%%@,****/(%#(%#(#(///(/*(%@&&'); + writeln('##%%##%%#(****/****/((((//(//(%#****/////**,,*(/#*,**********(/#%%(#&&&&&&&&&&&&%%%%(##((#####%#####((##((#(((((/////*/(#%(#(#%#%@%,,*/*/#######(//((/(//%@&&&&'); + writeln('####%##***/******/(((/(/////#%(//////(//*//(/***/((/*******/***//%%%#&@&&@@&@&&&&&&/(%%###%%%%%%#####(###(((((///%/////*/###((%%##&@**,**/(#%%(#%##((((((//%@&&'); + writeln('#####/**,,******#((/////*//(#(/((/(//(//*(/(/*/**//*((*****//*////%%&&&&@@@@&@@@&%*(#%((%%&&&%%%#######(((/// //(/(%#(####@@&.,*//(##%##%%#%((((#(/&@&%&&'); + writeln('##(**,***/**//(((///*///((((((((//##/%%/(##/*//,/*/*/*//****///////#%&&&@@&@@@@@&*/((%#((##&%&&%%###/(####(((. . *(/(%%(%%&@@&.*//(#####%%#%##(#(#/&@&%'); + writeln('(******/**/((((/(///#(#(####((//((##((#%%#*/(//(//(/(//*/(****///////&&@&@@@@@&&/(/(#(%%###%&&########(((* .... .....###(%@@@@/**####%#%%%%####(#(&@@&&&&&'); + writeln('****/***//(/(*/((/(((###/#%###/#(####(((((#%#/((/(((/////*/(***//////(&@@@@@@@&%/(((####%#%#&@&(((((((//*/.. . ............*##%#@&&&%%/###%%%#%#%##(%#&@@&&&'); + writeln('*///*//((/(/(((//#(((((/#####(#%##(#((((((((#%/#((((#//#////(/*/////((#&@@@@@%%%((((###(%###&/////////, , .....,......,...(@&&&%&%%#%#%&%%%%%%#(#%@@@&&&&&'); + writeln('(#///(((/#/(((/#((%((##(((#((/#%#(((((#(((((/(%##(((/#(/#/(//((//////((&@@@@&%#((((((#(((%&&%//////** ,* . .,.,,............,#%%%&%%%%%%%&&&%&%(%##%%&@@@&&'); + writeln('/*****/(//(/#//#((##((/(//##//###(((#(#(##((###%(##(((#/(#/((//((//(((((&@@@@%#((((######%%&%##(((/*/ ... . ...,,,,,,.,,....,,.(%#(%%%%%%&&&%%#%%#%(%@@@@&&'); + writeln('/*////(//((/(//((##(#((//%##/#(#%%#(#(#((##(#(##(/###(##((#(((/(#((/(((%%%&&&%%%%#((((#%###%#%#/(((//.. .... .....,,,,.,,,,,,,.,,.,./######%%&&&&#%##%&@&%&&'); + writeln('////(/(/##(#*//((#((#///(((#((//###((#((/((#%#(%#(#(#((#/(#(((((#(/((((###&%%%#%%##########(##((((((,. .... ......,,,.*,,,,,,.,,,..,.(######&&%%%%%%###&&&#'); + writeln('(((///(#((//*##(/(((*//*/((///,/#(#%(/(###/(((#&/#%((/#(((%(((((%#/((((###%%%%####%#(#%%#####(((((/(.. . .,...,,,,,,,,,,.,,,,.,..(####%%&&&&##%#&&%(&&'); + writeln('#(///#(//*(#(##*/(/**/*/**/*(/#*/*/((/**//(#((%#(#(((/##(#(##((###/(((#((#%%%%%######(#%#%##%((/##((,. ...,,.,,,,,.,,,.... ##%###&&&&%%%%&&&&&&'); + writeln('****((*//*##((**//****,,*,**///((/***##%#%#%###////**((/((//(/(##(#((##(###%%#%%######(((((######(((( . . ........ #####%&&&##%%&#&&&&'); + writeln('*,(/*/*/,*(*,***,,**/******,*#%/(%/****,*,**//****(*//*/(*////(((//*///((((((/(((//##/(%%(/#(/(//*/**/ ... #((#%&&%&%##%%#&#&&'); + writeln('.,...,.,..,,,,*,**,,*,,,*//*%&&@@@(&/*,*/*,,,,,,,,,,,,,/*********,,**////(//(/((((//***//********,,,,. . ... . .. . .#((#%&&&%%%%#&%#%&&'); + writeln('.......,,,,,**,,,,**,,**/##%%&&&%%#((/((///*,************,*****/****,***////////*//////////////////**,,,,,,........................ .... .///(#&%%##%#(##%%##'); + writeln('*,****/***//////////////////(((//(/////((((//(((/*/////*/****,,,,,,**/*/((((((((((////////((//////*****,*,,,,,,.......... . . *//(#(&%%###%#((%%/#'); + writeln('/****/***/////////////////*//////////(((///(////(////////*////**********//((//((/////////////////****,,,....... .. .......... .... ,*///(%&%###(##(#%#(#'); + writeln('****************/////*/**/////////////////////////////////////////**//(//((((/**/***////////////*****,,**,,,,.... ................,...,.,.******(((/(//(#(#%#(/'); + writeln('*,,***,,,******,*,*********/****//********,,,,,,**************//*///**//(((/////////*///**///******,,,,,,.....,,,,,,,,,,,,,,,,,....,,..,,,,,**///((((/(///((///'); + writeln(',,,*,,,,,,,,,,*******,**,,,**,,,,*,,***********,,,**,**,,****,**,*/*///////(((**/*//////////***///*,,,,,,,,,,,,*,..,..,,,,,...........,,,,**//(///(((//((/((((#'); + writeln(',,**,,**,***,,,,,,,,,*****,**,,,*,***********,****,,,,,*****/******/*/*/(//((//*//////////((//***,,,,,*,,,,,,.............,...........,.,****/////***//(((((((#'); + writeln('***,,,,,,,,,,,,,,,,,,,,,*,,***/***,****,***/**,****///*////////////*******//////((///**////////**,,,*******,,,,,,,,,,,...,,.........,**/*****////////////((((/('); + writeln('*****,*********************/***************************//*******/****///((((((///////////////*/*****,***,,,,,,,,,,,,,,,,,,,,,,,,,,,**,,,,,////((((#((////(((/(*'); + writeln('***,,,,,,,,*********,,,,,,,,**,,,*/***/**,,.,****///***/*********/((((((((/(////*********//*************,,**,,,,******,,,,,,,,,,,,*,********/////(/////*****///'); + writeln(',,,,,,,*,*************,,,....,.,,,,***,,****,**********************/(////((((/////(///**********************,,*******,,,,,,,,,,,,********,,,***,,,,***/**(/(((('); + writeln(); + writeln(); + writeln(); + + writeln(player,', ты попал в пещеру, пройдя вглубь, видишь маленькие щели между камней, через которые пробивается дневной свет.'); + writeln('Ты понимаешь, что выход завален камнями. Вернуться обратно ты не можешь, ведь кусок скалы, по которой ты собирался'); + writeln('взбираться... обвалилась после лавины'); + + writeln(); + + writeln('Варианты развития:'); + writeln('1. Использовать динамит;'); + writeln('2. Разбирать завал руками;;'); + writeln('3. Использовать рацию, позвать на подмогу.;'); + + readln(choise); + + case choise of + 1: + begin + if dynamite >= 1 then + begin + time := time + 1; + height := height + 1000; + endurance := endurance; + dynamite := dynamite - 1; + writeln('Уххххх, вот это позабавились!'); + end + else + begin + writeln('Ты же подумал: "Ну зачем мне может пригодиться динамит?"'); + end; + end; + 2: + begin + time := time + 2; + height := height + 1000; + endurance := endurance - 200; + writeln('Смелое решение, но силушек потратить прийдётся много...'); + end; + 3: + begin + if radio >= 1 then + begin + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + radio := radio - 1; + writeln('Подмога быстро подоспела, но всё же ты потратил силы, разбирая завал'); + end + else + begin + writeln('Ты же подумал: "Ну зачем мне рация? Я же интроверт!"'); + end; + end + else + begin + writeln(player,' не балуйся, нет здесь такого варианта'); + end; + end; + end; + +procedure Spiders(); + var + choise: Integer; + + begin + writeln(); + writeln(); + writeln(); + writeln('%%##%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%#%%##%%%#%#%#%##%##################################################################%#%#%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%#%%%%%%#%%#%%%##%#%%%##%%#%%####%###########################################################%#%#%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####%##%%##%##%%#######%#%#####################################################%######%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%%%%##%#%%%#%#%%#%%%####%################################################################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%#%%%%%#%%#%%#%##%%#%#####%###%#%%%#########################################################%#%##%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%#%###%#%%%#################################################################%##%%#%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%#%%%%%%%%#%%%#%##%#%%#%%#########%##########################################################%####%###%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%####%##%%###%%%%%#%%#################################################################%%##%###%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%#%##%%##%####%####%###%#################################################################%##%##%%#%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%%%%#%%%%################%%%###############################################(,..(#############%%#%##%%#%%%%%%%%%%#%%%%%%%%%%%'); + writeln('%#%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%#%%%##%%%#%#############################################################(,..,(###############%%##%###%%%%%%&%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%#%%%%%%##############(/..###########################################*....#####################%####%#%#%%&%#%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%#%###%#%#%%##############((/,..(#####################################(/.. ..(#########################%#%#%##%&%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%%%##%##(/################(((*..*####################################/....*####################%###%#####%##%#%&%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%####(,..##################,...(################################(/....*(######################%#############%&%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####(/*..(###############((.../##############################/*....*(##############(############%##%#####%%%&%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%%%%####((//..*((#############(*...(#########################(/......*(####################################%#%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%######((((((*..,(((((#########(....(#####################(/*.....,*###################%##############((((/#%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%#%###########(###((/, ..*/(((#######(/.. */(####(###########(/. ../######################%#########(,........(#%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%#%##################((,....*(((#(######(/ ..,/((###((#(#####(/. . . ,(##%##%###################/,.... .....*####%##%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%#%#############((###(((/*.....*/((((#(((((...,,,((((((((((#(/.. ....(######%#########(#(//,..........*#####%#%#%%#%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%##%##########((((((((((((*....,/((((((((/.....,((((/(((((/. ./##########(/,/*.............,*(#%##%###%%%%%%%%%%#%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%#%###########((((((((((((((//*......*//(((((. .. ,/////((((. (((#(/... ... ....,...,(#(###%%%%%%%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%###########((((((((((((((/////*.. .,/(/.. ,/*////*/ ///. ..... *#((####%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%#%%#########((((((((((((((((/////////*, . .//. .,****,. *.. ./#((#(#####%%##%%%%%%%%#%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%#%###########(((((((/(((//(//////////***,. //. . ..,,. . . ..,/#######%%%#%%%%%%%%#%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%#%%%%%%%########(#((((/(/(/////////**,,.....,,,, .,. .. . .((((((#########%%%%#%%%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%#########(((((///////*.. . . . ..,,,. . . . . */((########%##%#%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%#%%########((((((////*,. .. ...... ....,,, ...... . .,/(############%%%#%%%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%##%%#####((((((////*. ................. . .... ... .. . . */((((#########%####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'); + writeln('%%%%%%%%%%%%%%%%%%%%########((((////**. ... ... .................. ................ . *,....#######%####%##%%%%%%%%%%%%%%%%%%%%%&%%%&%%&%%%%%%&%%%'); + writeln('%%%%%%%%%%%%%%%%%%#%#####(((((////**. ...... ..................... .............. ,. ,/((####%###%%%###%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%&&%%&'); + writeln('%%%%%%%%%%%%%%%%%%%%%#####(((///*,. ............................... .............. .,*****//((#/((((/(###%##%###%%#%%%%%%%%%%%%%%&%%%&&%&%%%&&&%%%%%&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%####(((//,,. ....... .. ................. .... . ..............,/###%%%%%%%%%%%%%%%%%%%%&%%&%%%&%%&%&%'); + writeln('%%%%%%%%%%%%%%%%%%#%#####((/, . .. .... ................ . . ... ...... .....,,.......,/##%%%%%%%%%%%%%%%%&&%&%%%%%&&%&'); + writeln('%%%%%%%%%%%%%%%%%%%%%####((/, . ..... ............,,,,.. . ... .. . ......,**(/((/(#(((##(((/..........%%%%%%%%%%%%&%%&&%&%%%&%&%&'); + writeln('%%%%%%%%%%%%%%%%%%%%%####((//.. ..........,***, .........,*,,, . ......../(((((((#((((#(####(##((*........*#%%%%%%&%&&&&&&%&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%#%%####((//....,,.. ......,,....... .***,..,. */*////*.....,,,....,,......,(((####((#((#(#########(. ....,%%%%&&%&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%#%#####(((////**,,.. . . ................,,*/////...,*/(((((/((#(((((###((//(*,.....,....,,*########%#########((*.,. ..(%%&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%###((//********************. ...,..,,,//(##(((*.../#(#(##(########%######%###%###(#(*,*......../(##%%%%%%%%%%%%##((/,..%&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###(##(////(/////////*,.. .....,*//(((###%##(..,/#############%#####%#####%################(/*/.....#%%%%%%%%%%%%%%%&&&&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#######(((((((/((((,.....,/((/((##(#(##%%%%%*.,.#%%%%%%%%%%%%%%%%%%%%%%###%%%%%%%%#%####%%%%%%%%%%%%%%%&%%%&%%%&&&&&&&&&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#########(((((/,...,.*((#####(########%%%%#..,/%%%%%%%%%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%&&&%%&%&&&&&&&&&&&&%&&&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%###########/,...,,(################(###%%##..#%%&&&&&&&&&%&%&&&%&&&%%%%%%%&%%%%&%%%%%&%%&%&&&&%%%&&&%&&&&&%&&&&&&&&&&&&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%###%########(,...,,(#####%#%##############%%%#,./%%&%%%%&&&&&&&&&&&&&&&&&&&&&%&&&&%&&&&&&&&&&&%&%&&&&&&&&&&%&%&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('%%%%%%%%%%%%%%%%%%%%%%%%%%%#########,...,,#%%%%%%%%%%%%%#%#%####%##%%%%/..#%%&%&%%%&%&%%%&&&&&&&&&&&&&%&%&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('%%%&%%%%%%%%%%%%%%%%%%%%%########/...,*##%%%%%%%%%%%%%%%%%#%###%####%%(..#%&%%%&&%&%&&&&&%&&&&&&&&&&&&&&&&&%%&&&&&&&&&&&%&&&%&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&'); + writeln('%%%%%&%%%%&%%%%%%%%%%%%########*...(%%%%%%%%%%%%%%&&&%%%%%%#%########..,%%%&%&&&&%&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('%%%%&&%%%%%&%%%%%%%%%%%#####(...(#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#(,..*%%%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('%%&%%&%%&%%&%%%%%%%%%####(/..*#%%%%%%%%%%%%%%%%%%%&&%&%%&%%%%%%%#.,%%%%%&&%&&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&%%&%%%%&%%%%%%%%%%%#((/..,(%%%%%%%%%%%%%%%%%%%%&&&%%&&&&%&%&%%&&&&&%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&%&%%&&%&%%%%%%%%%#(/,..*#%%%%%%%%%%%%%%%&%%%%%&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&%%&&&%&%%&%%%#/,....&&&%%%%%%%%%%%%%%%%&%%%%%%%&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&&&&%&&%%&%%%(,,.%%%%%%%%%%%&%%%%%%%%&&%%%&%%%&%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&&&&&&&&%%%&&&&%%%%%&&&%&&&%%&%%%%&&%%%%%&%%%&%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&&%&&&&&&%%&&&&&&&&&&&&&&&&&%&&&&%&%&&%&&&&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&%%&&&&&&&&&&&&&&&%%%&&&&&%&&%%&%%%%&&%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('&&#&&%&%&&%&&&&&&&&&&&&&&&&&%&&&&%%&&&&%%&%&%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln(); + writeln(); + writeln(); + + writeln(player,'Гималайские прыгучие пауки, которые прячутся в укромных уголках и трещинах на склонах Эвереста напали на тебя!'); + writeln(); + writeln('Варианты развития:'); + writeln('1. Сразится с пауками;'); + writeln('2. Бежать по склону вниз и искать другой путь;'); + writeln('3. Оставить еду для приманки и бежать вверх;'); + writeln('4. Распугать всех пауков взрывом кислородного баллона;'); + + readln(choise); + + case choise of + 1: + begin + time := time + 1; + height := height; + endurance := endurance - 100; + writeln('Ты, конечно, молодец и пауки побеждены, но... и с места ты за час не сдвинулся.'); + end; + 2: + begin + time := time + 1; + height := height - 1000; + endurance := endurance; + writeln('Тебе нужно взойти на Эверест, а не убегать от пауков. Повёл себя, как маленькая девочка...'); + end; + 3: + begin + if food >= 1 then + begin + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + food := food - 1; + writeln('Ох и вымотала же тебя эта пробежка!'); + end + else + begin + writeln('Ты же на старте решил:"Мммм, слышал голодание - это круто!"'); + end; + end; + 4: + begin + if oxygen >= 1 then + begin + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + oxygen := oxygen - 1; + writeln('Уххххх, вот это бабахнуло!'); + end + else + begin + writeln('Ты же решил последовать примеру Рейнхольда Месснера и взбираться без кислородного баллона'); + end; + end + else + begin + writeln(player,' не балуйся, нет здесь такого варианта'); + end; + end; + end; + +procedure Superman(); + var + choise: Integer; + + begin + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' **************************************************************************** '); + writeln(' ******************************************************************************* '); + writeln(' **//*////////////////////////////////////////////////////////////////////***********, '); + writeln(' ***//, ,/////////////////*.. .*/////////////, /////************ '); + writeln(' ***/*. &&&* /////////////. .,((((, .///////// &&& ////////****,****** '); + writeln(' ***// /&&& ///////////, .&@&@@&@@@@@@@@@@@@&&& ,/////// ////////*****. ******** '); + writeln(' ****/ /&&& /////////// %&&&&@&@@@@@@@@@@@@@@@@@@@@@&& ////// //////////****. ******** '); + writeln(' ***** %&&& /////////// &@&@@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@&&, ////////////////////*. & /*****, '); + writeln(' .***** &&&&/ ////////////. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&& ////////////////////. &&& /****** '); + writeln(' .***** &&&&& .///////////// &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@ ///////////////////. &&&&& ******* '); + writeln(' .****, ,&&&&&& *//////////////* &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //////////////////. &&&&&&& *******. '); + writeln(' ,***. &&&&&. *///////////////// %&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/ .................. &&&&&&&&. ***** '); + writeln(' ***/ ,&&& ////////////////////, .*(%&&@@@@@@@@@@@@@@@@@&@&@@&@@@& &&&&&&( ***** '); + writeln(' *//* # *//////////////////(((((((((/. ,%@&&&&&&&&&&&&&&&&&&&&&&& *****. '); + writeln(' //// //////////////////((((#####((((((((((((((((((((((((((((((((////*. .&&&&&&&&&&&&&&&& /****, '); + writeln(' ,//// /////////////////((((#######((((((##########(((((((((((((((((////////// ,&&&&&&&&&& /***** '); + writeln(' ////, *///////////////(((((#########(################(((((((((((((((////////////* &&&&&&. ./**** '); + writeln(' ////,//////////////((((((######%%%######%%%%%########((((((((((((((((((((((//////, &&, .//**/ '); + writeln(' ./////////////////(((((((((((((####%%%%%%%&%%%%######(((((((((((((((((((((((((//// ////*. '); + writeln(' *//// *////////(((((((((((((#####%%&&&@@@&&&%%%##########(((((((((((((((((((((((/. /////* '); + writeln(' ///// .*(((((((((((((####%%&&@@@@@@@&&%%%##########((((((((((((((((((((((((/////* '); + writeln(' ////, ..**/##%&@@@@@@@@&&%%%#########((((((((((((((((((((((((((// '); + writeln(' ,//// .&&@@@@@&(*,.. .,*(((((((((((((((((((((((((/// '); + writeln(' ///// (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*. *((((((((((((((// '); + writeln(' ///// &@@@@@@@@@&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&. (((((((((( '); + writeln(' ///// &% .&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ,(((((((/ '); + writeln(' ////, (((((((((((##/ /@@@@@@@@@@@@@@@@@@@@@@@@ ((((((( '); + writeln(' *///(,(((((((((((((((((((( ,@@@@@@@@@@@@@@@#, *((((((( '); + writeln(' ////((((((((((((((((((((#* *((((((((((((. '); + writeln(' ///(((((((((((((((((((#######((((((((((((((####((((((/ '); + writeln(' ///((((((((((((((((((((((((((((((((((((((((((((((( '); + writeln(' ////// **/((((((((((((((((((((((((((, (((((( '); + writeln(' /////* (((((( '); + writeln(' /////. &&&(, ./%@@ /(((((* '); + writeln(' ///// ,&@@@@@@@@@@@@@@@@ *(((((* '); + writeln(' *///// (&@@@@@@@@@@@@ (((((/ '); + writeln(' ////// %&@@@@@@@&( (((((( '); + writeln(' /////* &@@@@@( (((((( '); + writeln(' ./////* @&& /(((((. '); + writeln(' ,/////. /(((((/ '); + writeln(' ////// .////(( '); + writeln(' /////////// '); + writeln(' .///////. '); + writeln(' *///, '); + writeln(' , '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(); + + writeln('Подымается снежный буран, и ты уже было подумал, что начался период муссонов, но это не ветры и не лавина,'); + writeln(' а пролетающий мимо Супермен, который готов помочь тебе.'); + writeln(); + writeln('Варианты развития:'); + writeln('1. Воспользоваться помощью супергероя, предложив ему кислородный баллон;'); + writeln('2. Воспользоваться помощью супергероя, предложив ему попить водички;'); + writeln('3. С перепугу бросить в Супермена зонтиком, как копьём;'); + writeln('4. Отнестись к супермену с недоверием, ведь он слишком уж навязчив;'); + + readln(choise); + + case choise of + 1: + begin + if oxygen >= 1 then + begin + time := time; + height := height + 2000; + endurance := endurance + 100; + oxygen := oxygen - 1; + writeln('Супермен вдохнул полной грудью и, подхватив тебя, помчался с невероятной скоростью.'); + writeln('Ты не успел глазом моргнуть, как оказался на 1000м ближе к вершине горы, ещё и отдохнул'); + end + else + begin + writeln('Тебя же вдохновил пример Рейнхольда Месснера и взбираться без кислородного баллона'); + end; + end; + 2: + begin + if water >= 1 then + begin + time := time + 1; + height := height + 1000; + endurance := endurance + 100; + water := water - 1; + writeln('Супермен утолил жажду, но скорость его, от большого количества выпитой воды, существенно'); + writeln('снизиласть. За то тебе удалось отдохнуть в полёте'); + end + else + begin + writeln('Ты же решил, что вода - это лишнее, когда вокруг столько снега!'); + end; + end; + 3: + begin + if umbrella >= 1 then + begin + writeln('Более грубого обращения с собой Супермен ещё не встречал. Он разозлися не на шутку,'); + writeln('глаза его налились кровью и, на эмоциях, он схватил тебя и сбросил с обрыва'); + WinOrLose('YOU HAVE LOST!');  + exit; + end + else + begin + writeln('Мысль метнуть зонтиком, как копьём мелькнула у тебя в голове, но ты вспомнил, что решил не брать его'); + end; + end; + 4: + begin + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + writeln('Тююю, почему бы не воспользоваться таким бонусом! Ну ок, иди пешком'); + end + else + begin + writeln(player,' не балуйся, нет здесь такого варианта'); + end; + end; + end; + +procedure Yeti(); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + var + choise: Integer; + + begin + writeln(); + writeln(); + writeln(); + writeln('(((#(((((((((((((((((((((((((((((((((#((((###(###((##((((((((((((((((((###%#((((((((((((((((((((((((((((((((((((#((((((##(((###########(((#(((((((((((((((((((('); + writeln('((((#####((#######((#(###(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((###((((((((##(##(##########(##########((((((((((((((((((((('); + writeln('#####(((((((#####(((((((((((((((((((((((((((##(((((((#((((((((((((((((((((((((((((((/((((((((((((((((((((((((((###########################((((((((((((((((((((('); + writeln('((((##(###%###((((((((((((((((((((((((((#((((#((#(#((((((((((((((((((((((((((((//////*//**//(((((((((((((#((#################(############((((((((((((((((((((('); + writeln('((((#((###############(((((((((((//////////(((/((((((((((((((((((////////((/////*//*/*******/((((((((((((((###############################((((((((((((((((((((('); + writeln('##((####((####(((##((((((((((((((((//////****///***////////*////*****,****///*////*///**********//(((((((((((#######################((######((((((((((((((((((('); + writeln('#(((((((##(((#((##(((((/(((((//((((//********////*//******//*****,,,,,,,,,,,,*****//////*******,,,***//((((#((################################((((((((((((((((('); + writeln('(((#((((#####(((((#((((((((////(/////****///*//*////*,*/////***,,,,,,,,,,,,,,,****************,,,,,,,,,****/(/((((((##(#######(##############(((((((((((((((((('); + writeln('##((((#((((((#(((((((((((((((///////***//////**/(////*//////***,*,,,,,,,,,,,,,,***,*****,,,****,,,,,,,,,,**,********///(((((((((((((((((((##((((((((((((((((((('); + writeln('(((((((((((((((((((((((((((/(///////***/**/*/*//(((((((((//****,,,,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,******,***,*******************/**////(((((#(((((((('); + writeln('(((((((((((((((((((((((((//////((//**//*****((((((#(#((#(/***,,,,,.,,.,,,,,,,,,*,***,,,,,,,,,,,,,,,,,,,,,,,*,****,*,,,*****************************/(((((##(((('); + writeln('(((((((((((((((###(((((((((////////**,**,**/##((//((((###(/*,,,,...........,,**,,,**,,,,,,,,,,,,,,,,,,,,,,,,,***********,,***************************/((((((((#'); + writeln('((((((((((((((((((##((((((////*/********//(###(((///(//(((/*,.....,****,,..,***,.....,**,,,,,,,,,,,,,,,,,,,,,,****,**,,,,************************,,,,***////((('); + writeln('((((((((((((((((((((((#((//*********,**,,(####(/((////////*,.....%&&%#(/*,,,(*,,,,,,,..,,*,,,,,,,,,,,,,,,,,,,,,,*,,,,*,,,,*********************,,,,,,,,,,,*/((('); + writeln('(((###(((#(((((((/(((//((///********,*,,*/#%##(((((////***//*,..#&&%...**,,//,,/%&%#(/*,.,*,,,,,,,,,,,,,,,,,,,,,,,,,,**,,*********************,**,,,,,,,,,,,*/('); + writeln('((((((((##(((((((//((((/////**,,***,,,,*/(######((((///*//****,.,((.. .,,*(,*(&&&%#(/*,,..,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,***//***/**/*****,,,,,,,,,,,,,,,*(('); + writeln('((#(((((((((((((////((((///****,,,,,,,,,,/(#####((((((////////****,*,.,..*(/,.(%%*. ..*,,..,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*****/*/*******,,,,,,**,,,,,,,**/('); + writeln('#(((######((((((/////((//*****,,,,,,,,,,*//((*//((#((((///////******/**,/(/*,,./(.. .,,...,,,,,..,,,,,,,,,,,,,,,,,,,,,,,,,,,***************,,,,,,,*,,,,,,,,,,*/'); + writeln('###(((((((((((//////*/(//***,,,,,,,,,,,,,,(((,..,**/(((((////////*///****,******,**,,,,*,,****/**/***,,,,,,,,,,,,,,,,,,,,,,,,****************,,**,,,,,,,,,,,,**'); + writeln('#######(((((((//////**(//*,***,,,,,,,,,,,,(((,.... ..*/(((//(////**///**//****/***/***//************,,*,****,,,,,,,,,,,,,,,,,,,,**********,,,,,,*,,,,,,,,,,,,,*'); + writeln('(#####((((#(((////////*//*****,,,,,,,,,,*/(((*... .. ..*,,*/(///**/**///*****/*****/*****/*****,*,,*,,,,****,,,,,,,,,,,,,,,,,,,,,,,,*,,********,,,,,,,,,,,,,,*/'); + writeln('((((((((((((((///////********,,,,,,..,/(#((((/,.. . ..*#,(,***,*////*//*****************/******,,,,***,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*******,,,,,,,,,,,,,,,,*'); + writeln('##((((((((((((///************,,,,,,..,((((((((*,. .. ,./.#(*,,,...,,*****/*******,*,***,,,,,,,,,,,,,......,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*/'); + writeln('#((((((((((((//*/****//**,,,,,,,,,,..,*((((/(((*,. .. . .*,.%#/*./*,,...,,,,,.,,,,,.,,,..,,,.................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*,,,,,,,,,,,,,,,,*/('); + writeln('##((((((((((((/****//****,,,,,,.,.,,,*(((((/((//,,... ...*(**(*.(//**,.,,,............,......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*,,,,,,,,,,,,,,,,*/(('); + writeln('((((((((((((((/**********,,,,,,..,,,,((((////((((*,......../(/.(////**.(/*,,,.................. .........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*('); + writeln('((((((((((((((/********,,,,,,......,*##((/////(////,,.......,.(//*,**,.///***,.,,................ .........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/('); + writeln('((((((((((((((/*******,,,,,,,.....,,/((/////////////*,,,....... ..*,,,./***,.,.... .......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*(('); + writeln('((((((((((((((****,,***,,,,,,,.,...,/((//////****///***,.,,,............,,,.*,,.........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/((('); + writeln('(((((((((((((/***,,,,,,,,,,,,..,....*((((/////***////****,,..,,,.,....................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*/((('); + writeln('((((((((((((*,,**,,,,,,,,,,,,......,(((((////**************,,,......,...........................,,.,,,,,,,,,,,,,,,,,,,,,,....,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/((('); + writeln('((((((((((/********,,,,,,,..........,/(((////***********,,,,*,*,,,,.,,,...... ... ...........,.,,,,,,,,,,,,,,,,,,,,,,,,.....,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*/(('); + writeln('((((((((((/**********,,,,,,.........,*((((////*********,,,,,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,..,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*/((('); + writeln('(((((((((//*****/****,,*,,,,,........//((/////***/****,*,,,*,*,,,,,,,,*,,,,,,,,,,,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.......,,,,,,,,,,,,,,,,,,,,,,,,,,,,,**(((('); + writeln('(((((((//*****//****,,,,,.........../*/(////////***,,******,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*,,,,,,*,,,,,,,,,,,,,,,,,,,,,.......,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*((((('); + writeln('((((((((/*/******,,,,,,.,,,,,........,//(////*///*******,**,,,,,,,,,**,,,,,,,,,,,,,,,,,,,,,,,,,,*,,,,,,,,,,,,,,,,,,.............,,,,,,,,,,.,...,,,,,,,.,,/((((('); + writeln('(((((((///**//**,,,,,,,,,.,..........*///(///*////******,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,..............,,,,,,,,,,,,,,,,,,,,,,,*/((((('); + writeln('((((((///**///***,,,*,,,,............./((/////////*******,*,,,,,,,,,,,,,,,,,*,*,,,,,,,,,,,,,,,,******,,,,,,,,,,,,.................,,,,,,,.,,,,,,..,,..,,*//(((('); + writeln('(((((//*////*******,,,..,.............*/(////////**********,,,,,,*,,,,,,,,,,,**,,,,,,,,,,,*,,,,,,,,,,,,,,,,,,,,.....................,,,,,,......,,.....,*/((((('); + writeln('(((///*///*******,,,,..,,..............,,*/(/*////********,*,,,,,,,,,,,,,,,,,,,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.....................,,,,,,,,.,,,,.......,,/((((('); + writeln('(((/////////****,,,,,,,,,...............,////**/*//**,,*********,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...................,,,,,,,,,,,............,,/((((('); + writeln('((/////**//**,,,,,.,,,,,................,////*********,,,****,,,,*,,,,,,,,..,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.........,,.........,,,,,,,,,,,,............,/((((('); + writeln('////*//**//**,,,,,,**,.................*//**//*,,*****,,,,***,,,*,,***,,.,,,.,,,,,,,,,.,,,,,,,,,,,,,,,,,,,,.........,...........,,,,,,,,,,,,,.,..........*/(((('); + writeln('(///*****//**,***,,,,,,,,,............*///******,,******,,,,,,,,***,,,,,,.,,.,,,,,,,,,,,,,,,,,,,,,,,,,.,...........,,............,,,,,,,,,,,,,,,,........,/(((('); + writeln('///******,*,,,.,,,,,,,,,,,,,,,........*////*****,**/***,,,*,,,,,,*,,,,,........,.,,.,,,,,,,,,,,,,,,,,,............**..........,,,,,,,,,,,,,,,,,,,..,,,,.,/(((//'); + writeln('//**,,,*,,..........,*,,,,,,,,,,,...,*//////**,,*******,,,**,,,,,,,,,,,,,,............,,,,,,,,,,,,,,,............,*/........,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,/((//'); + writeln('*,,..................,.....,,,,.....*/////////,,,*****,,,*,,,,,,,,..,,,,,.............,,,,,,,,,,.,.............,,*/*,.......,,,,,,,,,,,,,,,,,,,,,,,,......*////'); + writeln('............................,.....,*////((///,.,,*,*,,,,,,,,*,,,,..,,,,,,....,,,,.....,,,,,.,,................*/(//,........,,,,,,,,,,,,,,,,,,,,,,,,,..,,//(///'); + writeln('.................................,//////////*....,,,,,,*,,,,,,,,,,,,,.,......,,,,,,,,.,,,.....................*//(/*........,,,,,,,,,,,,,,,,,,,,,,,,.,,.,*/////'); + writeln('................................*/((//////////,....,,,,,,,,,,,,,,...,,,,,,.....,,,,,,,,.,.....................///////*.........,,,,,,,,,,,,,,,,,,,,,,,,,.,*///('); + writeln('..............................*///////(/////*,......,,,,,,,,,,,...,,,,,,,..................................,//(////(*,........,,,,,,,,,,,,,,,,,,,,,,.,,,.,*////'); + writeln('............................*//((///(/(///////,......,,,,.,,,,,,.,,,,,,.,,..................................*///////(/,........,,,,,,,,,,,,,,,,,,,,,,,,,,,,////'); + writeln('..........................//////((/////////*,.......,,,,,,,,,,,.,,,,.......................................*////((((/*,.........,,,,,,,,,,,,,,,,,,,,,,,,,,/////'); + writeln(); + writeln(); + writeln(); + + writeln(player,', тебе показалось, что начались галлюцинации. Но нет же. Перед тобой действительно стоит... самый настоящий Йети!'); + writeln(); + writeln('Варианты развития:'); + writeln('1. Кинуть в Йети энергетическим батончиком и сбежать;'); + writeln('2. Связать Йети с помощью верёвки и крюка;'); + writeln('3. Ослепить Йети фонариком;'); + writeln('4. Подружиться с Йети'); + + readln(choise); + + case choise of + 1: + begin + if food >= 1 then + begin + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + food := food - 1; + writeln('Не самый смелый поступок, конечно, нооооо... Он спас тебе жизнь!'); + end + else + begin + writeln('Ты же решил сбросить несколько килограммов и не взял еду!'); + end; + end; + 2: + begin + if rope >= 1 then + begin + rope := rope - 1; + writeln(player,' твоя жалкая попытка связать гигантского Йети увенчалась провалом, он разозлися не на шутку и полакомился тобой'); + WinOrLose('YOU HAVE LOST!');  + exit; + end + else + begin + writeln('Ты же решил, что верёвка и крюк - это лишний груз, помнишь?'); + end; + end; + 3: + begin + if flashlight >= 1 then + begin + time := time + 1; + height := height + 1000; + endurance := endurance - 100; + flashlight := flashlight - 1; + writeln('Тебе пришло гениальное решение! Йети ослеплён ярким светом твоего фонарика. Смело продолжай путь!'); + end + else + begin + writeln('Ты же решил, что не боишься темноты с 3-х лет и фонарь тебе попросту не нужен!'); + end; + end; + 4: + begin + writeln(player,' очень смелая попытка всё уладить с Йети. И, поначалу он шел на контакт, но в какой-то момент'); + writeln ('его дикая натура взяла верх над ним, что кончилось для тебя плохо... Ты много говорил, а он быстро проголодался!'); + writeln ('Он, заскучав от твоего рассказа, правильно расставил приоритеты в голове и понял, что в качестве еды ты устраиваешь'); + writeln ('его больше, нежели в качестве друга. Он съел тебя без единого зазрения совести.'); + WinOrLose('YOU HAVE LOST!');  + exit; + end + else + begin + writeln(player,' не балуйся, нет здесь такого варианта'); + end; + end; + end; + +procedure RandomEvent(); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + var + rNumber: Integer; + + begin + randomize; + rNumber := random(10) + 1; + + case rNumber of + 1,2: + begin + Meteorite_shower(); + end; + 3,4: + begin + Map(); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + end; + 5,6: + begin + Cave(); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + end; + 7,8: + begin + Spiders(); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + end; + 9: + begin + Superman(); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + end; + 10: + begin + Yeti(); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + end; + end; + end; + +begin + writeln('Приветствую, дорогой игрок, введи своё имя на английском языке, пожалуйста'); + writeln(); + readln(player); + + writeln(); + writeln(); + writeln(); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('***************************************************************************************************************************************************************'); + writeln('****************************************************************************@@%&@@@****************************************************************************'); + writeln('*************************************************************************(*%%*@@%&(@&(&&***********************************************************************'); + writeln('********************************************************************#*,****,,,(/(/,#,&&*%#&/*******************************************************************'); + writeln('***********************************************************************,/,,.#*,.(@&**(**,(#,,%**&&%************************************************************'); + writeln('*******************************************************************,**/.(,...*,.,,,,@*.*.,...,*.,/(.***********************************************************'); + writeln('*************************************************************%&&&&,*(,///@/#,.,%&(,.**,,*,*/,,,,*/(&(#(********************************************************'); + writeln('*********************************************************/#&&&%,..,*/#%%#&(//,(.(,*..**,.*....,,.,,@%&@@,******************************************************'); + writeln('*******************************************************,,,,.,.,,,(/,...**.*/*..(.(#%*#/.,...%,,,..%/&(%#/******************************************************'); + writeln('****************************************************(*,,*,...*,*,*%/#&*&@*&/(,/&&&/*/#&%@@&*&.,,*#/%,,,**,.****************************************************'); + writeln('***********************************************%/,*(**,....*/(,,*%/(,#&&&/&(%&&&%%&,%**&&@&&@&%,**.#.,%/,*.*..*************************************************'); + writeln('*******************************************/(*#/%,,,,,*../,.,,,.,,%(.**/%(%&%%/&@&&&&&,*#,.,.,...**.,......,/#(************************************************'); + writeln('***************************************//,(#*.,,.,,,,,,.....,,,*,,##*(,(/@@@&&@/&&&&&&(,#**((#,.,,....,.,#.....*/#*********************************************'); + writeln('*********************************/%((***,*,..,,,.,....**,,,,/#(,../..**.*,/&&,./(#/#%.,.,.*.....,(.(..,....,,,*,,%/********************************************'); + writeln('***************************%#(///***((*.,,,,,.,,........,.../,..,(.,/./&*.*.*./,..*.,,,,.......,,....((*,.,....,....//*****************************************'); + writeln('******************/%/(#/*,***,,,,,*,**,..,,,..,..,.,.,..,.,,.,,,.../....,................(.,............../%/..,....*.@#***************************************'); + writeln('****************/,*//#**,,,,.,,***/#,,,,.,.........,**...,**,....,/,,..,...**.**...*...............*.,..#..(.,.....%(..*/**************************************'); + writeln('***************%%#%/##%(****/(,*,((,,..,,.,,.....*,.....,,,,...,,.../..,**....,..../**...............(%.,,./,.,,%,,./,,.%@@/***********************************'); + writeln('*********%%&%&%%%##%%##(*(***,****...,,..,....#/*.......,*,....,..,/(*,..,...,.(...,.,,,................*/,*#&%/%&(%((%#/@&(&**********************************'); + writeln('********(&%%%%###%&%####(,,(**,,....,...,..*@(/.,.....,....,,,.....,(#,,#(*....,.,*.,.,.,&/.............(&&&%%#%%&(/,(/.&.*,#&@/*******************************'); + writeln('****#%#%#%##%@%%##(/*,,,../....,...,,,**..(.,......,,..,....,.,,,(*.*/....,...,..,,..,(,//,......,,..*#&%%#####&&/#.(,.,..(&@@@/*******************************'); + writeln('*/((###%%%#(##%#(//*,.,,,,,,,.,..,.,,,,*..**.........,..........,,*..#,../,,*,,..,,,..........,.....,//#&(%%/.,(**#(....*,/...,@@@@****************************'); + writeln('*,//(((#*(#/*(,/((,,/,,*.,,,,,,.,,,.,....,#,.(............,,,,.*..*.(,............(@%(.,.,.......,.#**/%*(&,,**%(..,#........,(%#@@//*************************&'); + writeln('(*,,***(#&%#/*/*//,*,/,/,,.,,,,,,..,,,.,,//..,.,...,...............,***.,.,........,@@@%,%@%**/%##/##,..#..,.//#/,,,..*.*.**,/(**%@(*#&@//*******************&&'); + writeln('*/#(//,*((((*,.,..((**,.,,.,,,,...,.,,,...,..,,.............,,......,,*...........,..,@&&@&(&%*%%,*,,..,.../(#&&%%#((,.*(*.....,..(&&.%,(@/****************&%&&'); + writeln('(*.,**.,,,,,,,,,#(*.,.,,,,,,(,..,&*,,,.......,,*,,...,,......,.........,.........,....&*@@@@@@&&*//.****#%&%%%%%#%##%#/,,,..///%&&&(%@(,/.((***********/(%%####'); + writeln('*,,.*,,*(**/,.,/,.,.,,,,/(*.....,,,,,.,,,,&(,*(*/,,*,...........,...*...,.........,..,..%@@@@@###(/**(%%%%&&&&%###((*..*%%&&&&&&&%%&@*#@&,,@@(******/%%&&&&&@&&'); + writeln(',,,,/((((*,,/*,,,*//((/.,..,,,*(#(/.........%**,.%*.*,,,,,....*.,,,,,.,,........../*****,,%%#&%%&&&&%%%##%%%%%%#(#(/(((##%&&&&&&%#(/*%(#@@((*)#/**/%##%&&&&&&&&'); + writeln('(#(#((/#(((((((((((**,,,.,.,,(%%...,...,.*....*...//..,,,.,,*,*,,,**,..........,****%***,,((@@@&&(#%&%%((&&%%##%&%%%#/(##&&&&&&@@@&&%/#&%/,,,(#%&((&/#%&&&&&&&&'); + writeln('##*%#(((//(((((((,*,,,,,,,&@&@&(*,./%,,,,......*.,.**,.,,....#*,,***,.,...*,,...../*,,(((,,.,@@@@%#**,**,,#((((%%%##%##%%%%%%%&&&&&%&%(***(((&&&&&&%%%%&&&&&&&&'); + writeln('**(((/(((((((,,,,*,,,/%#..,...%.....,,,*,..,,.**/.&@@,,**,./#(,*..,.,....**.,..,...,.**,..,.@@@*/*((//*,/(*/(((#%#%(#####((#%&&&%%#&%%((#####%%%%&&&&&&&&&&&&&&'); + writeln('(/(/*,**/,.,.,,*/@@/*##.. .......((..,..,/&&&%%/,.#*.%@@***,../#*,...,......,,,,.**,,*,,*.,,,#%@@**(/%(((/(#/((##%&(%##(#%/**/%&(//&%#((%&%#(%%##%&%%%%%&%&&&&&'); + writeln('*/,*,*,..,.@@@#&*,.#**#*/,,*............,,/,&%*/,*.@#*&@,,*,**((%*,.,.*,..,/((,...,**,*,,,*,,.,,@@*/#%##%&%#((##(##%%%#%*(//((#%&(#&&&&&&&%%%###%%&&&&&%%&%%&&&'); + writeln('**,./@@@&&&%#@&(,. **.****,.../***#,,,,%.*.@%//**/@(*@@#,*,.*,,**,,*,,....,(,..,,,,..(,,,,,..**@@%*,(%###/((#&&%#%((##*////(##&&&&&&&&&&&&&%%%%%%%&&&&&&&&&&&&&'); + writeln('&@@@@@@@@&&&&&@@@&.*(,../...,,**(#..&&**//*#,.@(*/..,@@,%/*,,,..***,%(#/(..,..&*..*....,((*,.,.,@@@@@@/(/*#(/(#&%%%&%((%*(*/(%&&&&&&&&&&&&&&&%%&&&&&&&&&&&&&&&&'); + writeln('@@@@@@@@@@&&&&&&&%**(*/.,@(#(&&/*@@*(.,.&/(%,..*.(#@#@@,*,.,,,.&&%/#/*.*,.*#*.....,%(.@#***,&@&&&@@&/(&@#/((((###%%%##(//%#&@@@@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'); + writeln('@@@@@@@@@@@@@&&%.,,#*%.,#,@*.,,@(,#&&///,..@%(&,*,***.@@&@,,.,.../,.*/*%,,..,.#**,**,,/#/%#.*,/&@@@&@@/&(((**///(/(#%%%%&&&&&&&&&&&@&&&&&&&&&&&&&&&&@@@@@@@&&&&'); + writeln('@@@@@@@@@&&&@@@&%*%.%, (.(,%&@%%(,#%(/#&(/*,*.#&*@#*@.(*#/%&&(,,*.,/@(%(/*&****./&(**,,,*.*,&(**,.@@@&(,#&(/(,*(&//*(/*(%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@@@@@@&&'); + writeln(); + writeln(); + writeln(); + + writeln(player,', ты стоишь у подножья Эвереста и тебе предстоит пройти увлекательный путь! Ну что, вперёд к невероятным приключениям!)'); + writeln('Тебе часто прийдётся делать выбор и принимать нелёгкие решения, которыми, порой, ты останёшься недоволен :)'); + writeln(); + + writeln(player,', собери комплект снаряжения из 5 предметов на твой выбор чтобы поскорее отправиться покорять Эверест'); + writeln(); + + writeln('1. Высококаллорийные энергетические батончики (3 батончика)'); + writeln('2. Вода в термостойких флягах (2 фляги)'); + writeln('3. Кислородный баллон (2 баллона)'); + writeln('4. Динамит (1 штука)'); + writeln('5. Верёвка с крюком + карабин (1 комплект)'); + writeln('6. Фонарь (1 штука)'); + writeln('7. Рация (1 штука)'); + writeln('8. Сверхпрочный зонт (1 штука)'); + + height := 0; + time := 0; + endurance := 900; + + food := 0; + water := 0; + oxygen := 0; + dynamite := 0; + rope := 0; + flashlight := 0; + radio := 0; + umbrella := 0; + + Equip(); + + while (height < 8000) and (time < 12) and (endurance >= 100) do + + begin + RandomEvent(); + writeln('Высота: ', height, 'м'); + writeln('Время: ', time,':00'); + writeln('Уровень жизненых сил: ', endurance, ' hp'); + end; + + if (height >= 8000) and (time < 12) and (endurance >= 100) then +    begin +     WinOrLose('MY CONGRATULATIONS! YOU HAVE WON!');        +    end; + +    if (time > 12) or (endurance < 100) then +    begin +       WinOrLose('YOU HAVE LOST!');  +    end; +end. \ No newline at end of file diff --git a/victoria.binkovskaya/project/uniconsole.o b/victoria.binkovskaya/project/uniconsole.o new file mode 100644 index 0000000..17f52ac Binary files /dev/null and b/victoria.binkovskaya/project/uniconsole.o differ diff --git a/victoria.binkovskaya/project/uniconsole.pas b/victoria.binkovskaya/project/uniconsole.pas new file mode 100644 index 0000000..debf6a5 --- /dev/null +++ b/victoria.binkovskaya/project/uniconsole.pas @@ -0,0 +1,228 @@ +unit uniconsole; + +interface + +const + // Color constants + Black = 0; + Blue = 1; + Green = 2; + Cyan = 3; + Red = 4; + Magenta = 5; + Brown = 6; + LightGray = 7; + DarkGray = 8; + LightBlue = 9; + LightGreen = 10; + LightCyan = 11; + LightRed = 12; + LightMagenta = 13; + Yellow = 14; + White = 15; + Blink = 128; + + // Procedures + procedure SetTitle(title: pchar); + + procedure TextColor(col: integer; bkCol: integer); + procedure TextColor(col: integer); + procedure GotoXY(x: shortint; y: shortint); + procedure ClrScr(); + procedure Delay(ms: integer); + + function Keypressed(): boolean; + function ReadKey(): Shortint; + function ReadChar(): char; + + +implementation + +uses + Windows; + +procedure delay(ms: integer); +begin + sleep(ms); +end; + +function keypressed(): boolean; +var + input_read : DWORD; + input_rec: INPUT_RECORD; +begin + keypressed := false; + repeat + input_read := 0; + PeekConsoleInput( + GetStdHandle(STD_INPUT_HANDLE), + input_rec, + 1, + input_read + ); + + if (input_read > 0) then + begin + if (input_rec.EventType = KEY_EVENT) + and (input_rec.Event.KeyEvent.bKeyDown) + and (input_rec.Event.KeyEvent.wVirtualKeyCode > 31) + then + begin + keypressed := true; + break; + end + else + begin + ReadConsoleInput( + GetStdHandle(STD_INPUT_HANDLE), + input_rec, + 1, + input_read + ); + end; + end + until input_read = 0; +end; + + +procedure readInput(var input_rec: INPUT_RECORD); +var + input_read : DWORD; +begin + repeat + input_read := 0; + ReadConsoleInput( + GetStdHandle(STD_INPUT_HANDLE), + input_rec, + 1, + input_read + ); + until (input_rec.EventType = KEY_EVENT) + and (input_rec.Event.KeyEvent.bKeyDown) + and (input_rec.Event.KeyEvent.wVirtualKeyCode > 31); +end; + +procedure setTitle(title: pchar); +var + newTitle: WideString; +begin + newTitle := utf8decode(title); + SetConsoleTitleW(pWideChar(newTitle)); +end; + +procedure TextColor(col: integer); +var + fullcol: integer; + csbi: CONSOLE_SCREEN_BUFFER_INFO; + HConsole: LongWord; + newAttributes : word; +begin + + HConsole := GetStdHandle(STD_OUTPUT_HANDLE); + + if not GetConsoleScreenBufferInfo(HConsole, csbi) then + exit; + + fullcol := (col mod 16); + + newAttributes := csbi.wAttributes; + newAttributes := newAttributes and $fff0; + newAttributes := newAttributes + fullcol; + + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), newAttributes); +end; + +procedure textcolor(col: integer; bkCol: integer); +var + fullcol: integer; + csbi: CONSOLE_SCREEN_BUFFER_INFO; + HConsole: LongWord; + newAttributes : word; +begin + + HConsole := GetStdHandle(STD_OUTPUT_HANDLE); + + if not GetConsoleScreenBufferInfo(HConsole, csbi) then + exit; + + fullcol := (bkCol mod 16) * 16 + (col mod 16); + + newAttributes := csbi.wAttributes; + newAttributes := newAttributes and $ff00; + newAttributes := newAttributes + fullcol; + + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), newAttributes); +end; + +procedure GotoXY(x: shortint; y: shortint); +var + coord: TCoord; +begin + coord.x := x; + coord.y := y; + SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); +end; + +procedure clrscr(); +var + coord: TCoord; + csbi: CONSOLE_SCREEN_BUFFER_INFO; + CharsFilled: LongWord; + CharsToFill: LongWord; + HConsole: LongWord; +begin + HConsole := GetStdHandle(STD_OUTPUT_HANDLE); + + coord.x := 0; + coord.y := 0; + + if not GetConsoleScreenBufferInfo(HConsole, csbi) then + exit; + + CharsToFill := csbi.dwSize.X * csbi.dwSize.Y; + + FillConsoleOutputCharacter( + HConsole, + ' ', + CharsToFill, + coord, + CharsFilled + ); + + FillConsoleOutputAttribute( + HConsole, + csbi.wAttributes, + CharsToFill, + coord, + CharsFilled + ); + + SetConsoleCursorPosition( HConsole, coord ); +end; + +function readkey(): Shortint; +var + input_rec: INPUT_RECORD; +begin + readInput(input_rec); + readkey := input_rec.Event.KeyEvent.wVirtualKeyCode; +end; + + + +function readchar(): char; +var + input_rec: INPUT_RECORD; +begin + readInput(input_rec); + readchar := input_rec.Event.KeyEvent.AsciiChar; +end; + +(* Starting routine *) +begin + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + textcolor(7,0); + clrscr; + FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); +end. \ No newline at end of file diff --git a/victoria.binkovskaya/project/uniconsole.ppu b/victoria.binkovskaya/project/uniconsole.ppu new file mode 100644 index 0000000..562b66b Binary files /dev/null and b/victoria.binkovskaya/project/uniconsole.ppu differ diff --git a/victoria.binkovskaya/uniconsole.pas b/victoria.binkovskaya/uniconsole.pas new file mode 100644 index 0000000..9ec0201 --- /dev/null +++ b/victoria.binkovskaya/uniconsole.pas @@ -0,0 +1,158 @@ +unit uniconsole; + +interface + procedure SetTitle(title: pchar); + + procedure TextColor(col: integer; bkCol: integer); + procedure GotoXY(x: shortint; y: shortint); + procedure ClrScr(); + procedure Delay(ms: integer); + + function Keypressed(): boolean; + function ReadKey(): Shortint; + function ReadChar(): char; + + +implementation + +uses + Windows; + +procedure delay(ms: integer); +begin + sleep(ms); +end; + +function keypressed(): boolean; +var + input_read : DWORD; + input_rec: INPUT_RECORD; +begin + keypressed := false; + repeat + input_read := 0; + PeekConsoleInput( + GetStdHandle(STD_INPUT_HANDLE), + input_rec, + 1, + input_read + ); + + if (input_read > 0) then + begin + if (input_rec.EventType = KEY_EVENT) + and (input_rec.Event.KeyEvent.bKeyDown) + and (input_rec.Event.KeyEvent.wVirtualKeyCode > 31) + then + begin + keypressed := true; + break; + end + else + begin + ReadConsoleInput( + GetStdHandle(STD_INPUT_HANDLE), + input_rec, + 1, + input_read + ); + end; + end + until input_read = 0; +end; + + +procedure readInput(var input_rec: INPUT_RECORD); +var + input_read : DWORD; +begin + repeat + input_read := 0; + ReadConsoleInput( + GetStdHandle(STD_INPUT_HANDLE), + input_rec, + 1, + input_read + ); + until (input_rec.EventType = KEY_EVENT) + and (input_rec.Event.KeyEvent.bKeyDown) + and (input_rec.Event.KeyEvent.wVirtualKeyCode > 31); +end; + +procedure setTitle(title: pchar); +var + newTitle: WideString; +begin + newTitle := utf8decode(title); + SetConsoleTitleW(pWideChar(newTitle)); +end; + +procedure textcolor(col: integer; bkCol: integer); +var + fullcol: integer; +begin + fullcol := (bkCol mod 16) * 16 + (col mod 16); + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), fullcol); +end; + +procedure GotoXY(x: shortint; y: shortint); +var + coord: TCoord; +begin + coord.x := x; + coord.y := y; + SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); +end; + +procedure clrscr(); +var + coord: TCoord; + Filled: Longword; +begin + coord.x := 0; + coord.y := 0; + + FillConsoleOutputCharacter( + GetStdHandle(STD_OUTPUT_HANDLE), + ' ', + 80*25, + coord, + Filled + ); + + FillConsoleOutputAttribute( + GetStdHandle(STD_OUTPUT_HANDLE), + 7, + 80*25, + coord, + Filled + ); + GotoXY(0,0); +end; + +function readkey(): Shortint; +var + input_rec: INPUT_RECORD; +begin + readInput(input_rec); + readkey := input_rec.Event.KeyEvent.wVirtualKeyCode; +end; + + + +function readchar(): char; +var + input_rec: INPUT_RECORD; +begin + readInput(input_rec); + readchar := input_rec.Event.KeyEvent.AsciiChar; +end; + +(* Starting routine *) +begin + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + textcolor(7,0); +// clrscr; + FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); +end. \ No newline at end of file