home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Direkt 1995 #1
/
Image.iso
/
cdd
/
direkt
/
fingb
/
ballern.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-08-03
|
16KB
|
546 lines
PROGRAM Ballern;
USES CRT, GRAPH, DOS, MOUSE;
VAR x, y, x1, y1 : INTEGER;
Ch : CHAR;
Frage, Player1, Player2, Wahl : STRING;
PROCEDURE Anleitung;
begin
gotoxy (35,2);
write ('SPIELREGELN');
gotoxy (35,3);
write ('===========');
gotoxy (15,5);
write ('Dieses Spiel kann nur mit 2 Spielern gespielt werden.');
gotoxy (15,7);
write ('Es hat am Ende der Spieler gewonnen, der den anderen');
gotoxy (15,9);
write ('zuerst abgeschossen hat. Jeder Spieler hat eine ');
gotoxy (15,11);
write ('Schützung, in der er nicht vom anderen Spieler getroffen');
gotoxy (15,13);
write ('werden kann, von der aus aber auch er nicht seinen Gegner');
gotoxy (15,15);
write ('treffen kann. Die 4 türkisfarbenen Wände an den 4 Eckpunk-');
gotoxy (15,17);
write ('ten darf man als Spieler nicht berühren, da dann der Gegner');
gotoxy (15,19);
write ('gewonnen hat.');
gotoxy (41,20);
write ('Und nun VIEL SPASS !!!');
gotoxy (30,24);
write ('Weiter mit bel. Taste');
Ch := ReadKey;
end;
BEGIN
clrscr;
REPEAT
clrscr;
gotoxy (19,13);
write ('(S)piel starten / (R)egeln ? (S/R) : ');
readln(Wahl);
IF ( Wahl = 'r' ) OR ( Wahl = 'R' )
THEN
begin
Anleitung;
end;
UNTIL ( Wahl = 's' ) OR ( Wahl = 'S');
REPEAT
clrscr;
TextColor (White);
gotoxy (25,12);
write ('Name Player 1 : ');
readln(Player1);
gotoxy (25,14);
write ('Name Player 2 : ');
readln(Player2);
gotoxy (30,24);
write ('Weiter mit " RETURN"');
REPEAT
Ch := ReadKey;
UNTIL Ch = #13;
clrscr;
gotoxy (25,2);
write ('TASTENKOMBINATIONEN FÜR PLAYER 1');
gotoxy (25,3);
write ('════════════════════════════════');
gotoxy (35,7);
write ('Du bist : ');
TextColor (Green);
write ('');
TextColor (White);
gotoxy (29,9);
write ('Nach Links => " <- "');
gotoxy (29,11);
write ('Nach Rechts => " -> "');
gotoxy (31,13);
write ('Ende mit " CTRL-C "');
gotoxy (31,15);
write ('Schießen => " <┘ "');
gotoxy (30,24);
write ('Weiter mit " RETURN"');
REPEAT
Ch := ReadKey;
UNTIL Ch = #13;
clrscr;
TextColor (White);
gotoxy (25,2);
write ('TASTENKOMBINATIONEN FÜR PLAYER 2');
gotoxy (25,3);
write ('════════════════════════════════');
gotoxy (35,7);
write ('Du bist : ');
TextColor (Magenta);
write ('');
TextColor (White);
gotoxy (29,9);
write ('Nach Links => " Y "');
gotoxy (29,11);
write ('Nach Rechts => " X "');
gotoxy (31,13);
write ('Ende mit " CTRL-C "');
gotoxy (31,15);
write ('Schießen => " ESC "');
gotoxy (30,24);
write ('Weiter mit " RETURN"');
REPEAT
Ch := ReadKey;
UNTIL Ch = #13;
DefineTextCursor (hardwaretextcursor,0,0);
clrscr;
TextColor (Cyan);
gotoxy (1,24);
write ('|');
gotoxy (80,24);
write ('|');
gotoxy (1,1);
write ('|');
gotoxy (80,1);
write ('|');
TextColor (Green);
gotoxy (70,24);
write ('');
TextColor (Magenta);
gotoxy (10,1);
write ('');
TextColor (Brown);
gotoxy (2,23);
write ('┌');
gotoxy (3,23);
write ('─');
gotoxy (4,23);
write ('─');
gotoxy (5,23);
write ('─');
gotoxy (6,23);
write ('─');
gotoxy (7,23);
write ('┐');
gotoxy (74,2);
write ('└');
gotoxy (75,2);
write ('─');
gotoxy (76,2);
write ('─');
gotoxy (77,2);
write ('─');
gotoxy (78,2);
write ('─');
gotoxy (79,2);
write ('┘');
x := 70;
y := 24;
x1 := 10;
y1 := 1;
REPEAT
Ch := ReadKey;
IF Ch = #75
THEN
begin
x := x-1;
y := y;
gotoxy (x,y);
TextColor (Green);
write ('');
x := x+1;
y := y;
gotoxy (x,y);
TextColor (Black);
write (' ');
x := x-1;
y := y;
gotoxy (x,y);
TextColor (Green);
end;
IF Ch = #77
THEN
begin
x := x+1;
y := y;
gotoxy (x,y);
TextColor (Green);
write ('');
x := x-1;
y := y;
gotoxy (x,y);
TextColor (Black);
write (' ');
x := x+1;
y := y;
gotoxy (x,y);
TextColor (Green);
end;
IF Ch = #13
THEN
begin
FOR y := 23 DOWNTO 2 DO
begin
x := x;
y := y-1;
gotoxy (x,y);
TextColor (Yellow);
write ('║');
x := x;
y := y+1;
gotoxy (x,y);
TextColor (Black);
write (' ');
delay (5);
end;
x := x;
y := 1;
gotoxy (x,y);
TextColor (Black);
write (' ');
IF ( x = 74 ) OR ( x = 75 ) OR ( x = 76 ) OR ( x = 77 ) OR ( x = 78 ) OR ( x = 79 ) OR
( x = 2 ) OR ( x = 3 ) OR ( x = 4 ) OR ( x = 5 ) OR ( x = 6 ) OR ( x = 7 )
THEN
begin
TextColor (Brown);
gotoxy (2,23);
write ('┌');
gotoxy (3,23);
write ('─');
gotoxy (4,23);
write ('─');
gotoxy (5,23);
write ('─');
gotoxy (6,23);
write ('─');
gotoxy (7,23);
write ('┐');
gotoxy (74,2);
write ('└');
gotoxy (75,2);
write ('─');
gotoxy (76,2);
write ('─');
gotoxy (77,2);
write ('─');
gotoxy (78,2);
write ('─');
gotoxy (79,2);
write ('┘');
x1 := x1;
y1 := y1;
gotoxy (x1,y1);
TextColor (Magenta);
write ('');
end;
x := x;
y := 24;
gotoxy (x,y);
TextColor (Green);
write ('');
end;
IF Ch = #121
THEN
begin
x1 := x1-1;
y1 := y1;
gotoxy (x1,y1);
TextColor (Magenta);
write ('');
x1 := x1+1;
y1 := y1;
gotoxy (x1,y1);
TextColor (Black);
write (' ');
x1 := x1-1;
y1 := y1;
gotoxy (x1,y1);
TextColor (Magenta);
end;
IF Ch = #120
THEN
begin
x1 := x1+1;
y1 := y1;
gotoxy (x1,y1);
TextColor (Magenta);
write ('');
x1 := x1-1;
y1 := y1;
gotoxy (x1,y1);
TextColor (Black);
write (' ');
x1 := x1+1;
y1 := y1;
gotoxy (x1,y1);
TextColor (Magenta);
end;
IF Ch = #27
THEN
begin
FOR y1 := 2 TO 24 DO
begin
x1 := x1;