Comments

: i have some questions about crossword ~: Please help me!: : 1) How to set the background colour and text colour in pascal??: : 2) I want to know does pascal has this function??: if i input the right answer in the game : then the colour of text will change to another colour~~: How can do this??: : Suggest the simplest way to me~: THZ~: 1: TextColor() and TextBackground() in the CRT unit.

2: Set the new textcolor and write the answer again at the same location.

: : i have some questions about crossword ~: : Please help me!: : : : 1) How to set the background colour and text colour in pascal??: : : : 2) I want to know does pascal has this function??: : if i input the right answer in the game : : then the colour of text will change to another colour~~: : How can do this??: : : : Suggest the simplest way to me~: : THZ~: : : 1: TextColor() and TextBackground() in the CRT unit.: : 2: Set the new textcolor and write the answer again at the same location.: THX~BUT I Have a error200 when i set the text colour.

: : : i have some questions about crossword ~: : : Please help me!: : : : : : 1) How to set the background colour and text colour in pascal??: : : : : : 2) I want to know does pascal has this function??: : : if i input the right answer in the game : : : then the colour of text will change to another colour~~: : : How can do this??: : : : : : Suggest the simplest way to me~: : : THZ~: : : : : 1: TextColor() and TextBackground() in the CRT unit.: : : : 2: Set the new textcolor and write the answer again at the same location.: : : THX~: BUT I Have a error200 when i set the text colour.: : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.

: : : : i have some questions about crossword ~: : : : Please help me!: : : : : : : : 1) How to set the background colour and text colour in pascal??: : : : : : : : 2) I want to know does pascal has this function??: : : : if i input the right answer in the game : : : : then the colour of text will change to another colour~~: : : : How can do this??: : : : : : : : Suggest the simplest way to me~: : : : THZ~: : : : : : : 1: TextColor() and TextBackground() in the CRT unit.: : : : : : 2: Set the new textcolor and write the answer again at the same location.: : : : : THX~: : BUT I Have a error200 when i set the text colour.: : : : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.: OK!The problem has been solved.

2)I think this method is not suitable in my idea. My idea is like that: I had set a display with many letters for the player to choose them. If they choose a right letter, it will change colour.

[b][red]This message was edited by zibadian at 2004-11-19 12:49:51[/red][/b][hr]: : : : : i have some questions about crossword ~: : : : : Please help me!: : : : : : : : : : 1) How to set the background colour and text colour in pascal??: : : : : : : : : : 2) I want to know does pascal has this function??: : : : : if i input the right answer in the game : : : : : then the colour of text will change to another colour~~: : : : : How can do this??: : : : : : : : : : Suggest the simplest way to me~: : : : : THZ~: : : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.: : : : : : : : 2: Set the new textcolor and write the answer again at the same location.: : : : : : : THX~: : : BUT I Have a error200 when i set the text colour.: : : : : : : : : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.: : : OK!The problem has been solved.: : 2)I think this method is not suitable in my idea.: My idea is like that:: I had set a display with many letters for the player to choose them.: If they choose a right letter, it will change colour.: : Any other method??: : 3)How to set a timer that count down 30 minutes. : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.

3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:[code]function TimeInMin: Word;var Hour, Minutes, Seconds, HSeconds: word;begin GetTime(Hour, Minutes, Seconds, HSeconds); TimeInMin := Hour*60+Minutes;end;

{ Do Game } { Do not use read() or readln(), because those have their own waiting routine } { but readkey() and keypressed() instead } { If the player successfully finishes the game set the GameFinished to true } { If you want to let the player know how much time is left: } { write the following result somewhere: 30-(TimeInMin-GameStart) }

: [b][red]This message was edited by zibadian at 2004-11-19 12:49:51[/red][/b][hr]: : : : : : i have some questions about crossword ~: : : : : : Please help me!: : : : : : : : : : : : 1) How to set the background colour and text colour in pascal??: : : : : : : : : : : : 2) I want to know does pascal has this function??: : : : : : if i input the right answer in the game : : : : : : then the colour of text will change to another colour~~: : : : : : How can do this??: : : : : : : : : : : : Suggest the simplest way to me~: : : : : : THZ~: : : : : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.: : : : : : : : : : 2: Set the new textcolor and write the answer again at the same location.: : : : : : : : : THX~: : : : BUT I Have a error200 when i set the text colour.: : : : : : : : : : : : : : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.: : : : : OK!The problem has been solved.: : : : 2)I think this method is not suitable in my idea.: : My idea is like that:: : I had set a display with many letters for the player to choose them.: : If they choose a right letter, it will change colour.: : : : Any other method??: : : : 3)How to set a timer that count down 30 minutes. : : : : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.: : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:: [code]: function TimeInMin: Word;: var: Hour, Minutes, Seconds, HSeconds: word;: begin: GetTime(Hour, Minutes, Seconds, HSeconds);: TimeInMin := Hour*60+Minutes;: end;: : var: GameFinished: boolean;: { program part }: GameStartTime := TimeInMin;: GameFinished := false;: : repeat: : { Do Game }: { Do not use read() or readln(), because those have their own waiting routine }: { but readkey() and keypressed() instead }: { If the player successfully finishes the game set the GameFinished to true }: { If you want to let the player know how much time is left: }: { write the following result somewhere: 30-(TimeInMin-GameStart) }: : until (TimeInMin = GameStartTime+30) or GameFinished;: : if GameFinished then: PlayerHasWon: else: PlayerHasLost;: [/code]: : : Thank you.But it said GetTime is a unknown identifier.what should it set?uses crt ??uses Doc or something else??

: : [b][red]This message was edited by zibadian at 2004-11-19 12:49:51[/red][/b][hr]: : : : : : : i have some questions about crossword ~: : : : : : : Please help me!: : : : : : : : : : : : : : 1) How to set the background colour and text colour in pascal??: : : : : : : : : : : : : : 2) I want to know does pascal has this function??: : : : : : : if i input the right answer in the game : : : : : : : then the colour of text will change to another colour~~: : : : : : : How can do this??: : : : : : : : : : : : : : Suggest the simplest way to me~: : : : : : : THZ~: : : : : : : : : : : : : 1: TextColor() and TextBackground() in the CRT unit.: : : : : : : : : : : : 2: Set the new textcolor and write the answer again at the same location.: : : : : : : : : : : THX~: : : : : BUT I Have a error200 when i set the text colour.: : : : : : : : : : : : : : : : : : : : : : : : If you are using TP, have you patched your CRT unit? If not search for CRT patch on google, and install that. It is necessary for fast computers.: : : : : : : OK!The problem has been solved.: : : : : : 2)I think this method is not suitable in my idea.: : : My idea is like that:: : : I had set a display with many letters for the player to choose them.: : : If they choose a right letter, it will change colour.: : : : : : Any other method??: : : : : : 3)How to set a timer that count down 30 minutes. : : : : : : : : 2: You could change the color directly in the video memory, but that would require some assembly and an intricate knowledge of the video memory. The only true-Pascal way is to use TextColor(), TextBackround(), GotoXY() and write() to set it.: : : : 3: The only two ways to do this is to either use interrupts, or use a loop and GetTime(). Here is a sample code to illustrate the latter:: : [code]: : function TimeInMin: Word;: : var: : Hour, Minutes, Seconds, HSeconds: word;: : begin: : GetTime(Hour, Minutes, Seconds, HSeconds);: : TimeInMin := Hour*60+Minutes;: : end;: : : : var: : GameFinished: boolean;: : { program part }: : GameStartTime := TimeInMin;: : GameFinished := false;: : : : repeat: : : : { Do Game }: : { Do not use read() or readln(), because those have their own waiting routine }: : { but readkey() and keypressed() instead }: : { If the player successfully finishes the game set the GameFinished to true }: : { If you want to let the player know how much time is left: }: : { write the following result somewhere: 30-(TimeInMin-GameStart) }: : : : until (TimeInMin = GameStartTime+30) or GameFinished;: : : : if GameFinished then: : PlayerHasWon: : else: : PlayerHasLost;: : [/code]: : : : : : : Thank you.: But it said GetTime is a unknown identifier.: what should it set?: uses crt ??uses Doc or something else??: GetTime() is part of the Crt unit. This kind of questions can also be answered by looking the function up in the help files. It lists the unit and also the precise description and declaration.

if GameFinished then begin if TypedWord = 'This is an example game' then writeln('You typed the correct word.') else writeln('You typed an incorrect word.') end else writeln('You did not type fast enough'); readln;end.[/code]