Find Jobs
Hire Freelancers

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

$10-30 USD

已完成
已发布超过 7 年前

$10-30 USD

货到付款
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.
项目 ID: 11597579

关于此项目

7提案
远程项目
活跃7 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
$15 USD 在1天之内
5.0 (2条评论)
1.1
1.1
7 freelancers are bidding on average $44 USD for this job
用户头像
Hi. Contact me to discuss problem over chat. It would be great if you give me more information .
$25 USD 在1天之内
5.0 (2条评论)
2.1
2.1
用户头像
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 在3天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
SUNNYSIDE, United States
5.0
6
付款方式已验证
会员自9月 14, 2016起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。