Computer Science Canada letter appearing individually |
Author: | cutecotton [ Fri Jan 10, 2003 10:32 pm ] |
Post subject: | letter appearing individually |
hi everyone, i'm making a typing tutor as my program. And i'm wondering (i saw someone else's program that does this, it was a demo) how do i make it so that each letter on teh word appears individually? so say i wanan make the word "hello" how do i mkae it so that the h comes, thent eh e, then the l, l, and o? I know it involves a for loop and delays..if anyone can hlep me, tks a bunch |
Author: | Brightguy [ Fri Jan 10, 2003 11:37 pm ] | ||
Post subject: | Re: letter appearing individually | ||
What about something like this:
The ".." allows the next letter to be output on the same line. |
Author: | Tony [ Sat Jan 11, 2003 2:23 am ] |
Post subject: | |
could have been my textDelay procedure http://danco.no-ip.com/turing/viewtopic.php?t=52 textDelay colored (same link) also shows how to change colors so that letter appears in one color, then changes to another after next letter is typed. You can modify that to make letters appear in 2 colors. Such as black for what the user typed already and say blue for the letter they must press now. Also you can put in a little if statment to display typos in red This program sounds interesting, I hope you'll share it with us when its done (once again you can just submit compiled file if you don't want to share code). |
Author: | Brightguy [ Sat Jan 11, 2003 1:06 pm ] |
Post subject: | Submissions |
Exactly what types of programs are you looking for submissions? I've written a few odd ones here and there. Nothing that's incredibly great, in fact I view most of the code fairly primitive and unorganised. I've written an LED-emulator that allows you type any four letters/symbols then displays them in LED format (like the numbers on digital clocks) it's cool at first, but it gets old. Then there's the resistor colour-code decoder, a word game, a rolling ball, and a traffic light program that shows a regular traffic light and crudely determines a car's speed from the light. (If you go too fast, you crash!) Just about all of these were written in my first year of programming, so don't expect great work, but I supposed some of them are good, at least for a novelty. |
Author: | azndragon [ Sat Jan 11, 2003 4:37 pm ] |
Post subject: | |
Hmm, that's EXACTLY what I was supposed to do for my class yesterday, kinda weird if you ask me. |
Author: | cutecotton [ Tue Jan 14, 2003 1:03 am ] |
Post subject: | |
wow guys, tks so much for the reply! (was busy tehse couple days, pounding away on the computer for hte program). I managed to get the text individually appear...and i htink that typo thing will REALLY come in handy..od u mind if i ask u for some details on it? Cuz i plan to make a test for the user. So they have to type "HELLO, my name is joe." how would i make a typo appear right hwen the user types one letter wrong?! aahh i really honestlyneed that for my program lol. I checked out the link u gave me..and got my text to go differnet colors (definitly will come in handy later on). Tony, can up lz get back to me on the typo thing asap? I want to record the WPM (words per minute) if possible...ne1 think taht woudl be too hard? i know turing has some kinda clock/timing command, but hten again i'm not sure on it. Once i get the program pua dn urnning (hell of a long way from that), i'll definily put it up here 4 u gu ys...tho it will be pretty huge lol. |
Author: | Tony [ Tue Jan 14, 2003 12:50 pm ] | ||
Post subject: | |||
you can use wallclock() function to time sertain periods. Such as time one value at the beginning of typing and time another value when typing is done. Then by subtracting one from another, you'll get the time passed. For typos, you check each letter if it matches the one needed to type. Basically you run your loop and after each getch() you check that it equals to the letter from the sentance on current counter. such as
|