Find Jobs
Hire Freelancers

create a typing game in C++. (C++ language only) (should be working in eclipse CDT)

$10-30 USD

Completed
Posted over 7 years ago

$10-30 USD

Paid on delivery
This is to implement a simple typing lesson game. Computer will generate a random string of 7 characters and you need to reproduce it within 7 seconds. You will lose points significantly if you fail to produce the same string within the set time interval. You have 1000 points in the beginning of the game. Given 7 randomly generated letters being mixed with lower and upper cases, you need to type them correctly within 7 seconds (7000 msec). You will get 500 points every time you produce the matching string within the interval. You will loose an amount of delayed time in millisecond, e.g., your typing ended in 7350 msec, so you would loose 350 points. If you misspell, you will be penalized by the total offset of mistaken letters. You will loose this offset from your points. The offset is computed by accumulating the absolute distance between two characters in the same position, one from the generated string and another from the input. For instance, the offset of "Game" and "Mag" is 81. The shorter string is padded with space(s). Therefore, |G - M| = 6, |a - a| = 0, |m - g| = 6, |e - (space)| = 69. Use ASCII table ([login to view URL]) to see the assigned number to each alphabet under "char" and "html". If you misspell and overtime, you will be penalized the double score of the offset, plus delayed amount of time. The game ends if you reach score 5000 or 0. With 20% of chance of each character generation, a resulting string may contain wild letters, [0-9] and [%-&], which respectively indicate any number letter and any symbol letter, that means that either of the two wild letters is chosen with the probability of 0.2 when generating a random letter. Symbol excludes digits and upper/lowercase letters. Typing error is treated as an offset from '0' and '*' respectively. For instance, the offset of Twv[0-9]JG[%-&] and TwvxJG2 is 80. There were a few ways to approximate elapsed time. The new C++ 2011 standard has a good way to do it by including <chrono> library. See the item 17 of this post ([login to view URL]) to adapt into your logic. Furthermore, to activate C++ 2011 standard, you need to instruct g++ compiler with -std=c++11 option. Refer to this post #143 ([login to view URL]) to realize it. See the next sample game session: Your current points 1000, just type -> PEq[0-9]R[%-&][0-9]: PEq0R%0 4958 milliseconds, you made it within the interval of 7000... Your current points 1500, just type -> nELJSgd: nELJSgd 4297 milliseconds, you made it within the interval of 7000... Your current points 2000, just type -> gP[0-9][0-9]uCO: gP00uCO 5816 milliseconds, you made it within the interval of 7000... Your current points 2500, just type -> [0-9][0-9]nQp[0-9]m: 00nQp0m 6131 milliseconds, you made it within the interval of 7000... Your current points 3000, just type -> UIqIaBX: UIqIaBX 5861 milliseconds, you made it within the interval of 7000... Your current points 3500, just type -> [%-&]ErooJ[%-&]: %-&ErooJx 8966 milliseconds, you *failed* it within the interval of 7000... String offset is 381, your total penalty is 2728... Your current points 772, just type -> [%-&]pXwMFm: %pXmS2g 10698 milliseconds, you *failed* it within the interval of 7000... String offset is 42, your total penalty is 3782... Bye... Use isdigit() and isalnum() utility functions wisely. Finally, like the previous assignment, implement the specified task with your shortest possible coding.
Project ID: 11597579

About the project

7 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
$15 USD in 1 day
5.0 (2 reviews)
1.1
1.1
7 freelancers are bidding on average $44 USD for this job
User Avatar
Hi. Contact me to discuss problem over chat. It would be great if you give me more information .
$25 USD in 1 day
5.0 (2 reviews)
2.1
2.1
User Avatar
I'm used to this kind of game (in C/C++) because I already worked with many similar university projects/works. Also, C/C++ are my favorite languages, and I'm well oriented at how to build, debug and optmize codes of these languages. But my bigger motivation to be awarded is because I want to do it. It's funny, well explained, and I know I'm completely capable of finishing it soon. Please let me know if there's any doubt about my bid or anything to discuss at all. Best Regards, Hygor.
$55 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
SUNNYSIDE, United States
5.0
6
Payment method verified
Member since Sep 14, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.