绝想首页

短小精悍的游戏代码

盛权刚 [甜蜜] 2013-03-07 20:08:58 星期四 晴天 查看:103 回复:0 发消息给作者
//HANGMAN
//The classic game of hangman
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
 //Initialization
    const int MAX_WRONG=8;
    vectorwords;
    words.push_back("GUESS");
    words.push_back("HANGMAN");
    words.push_back("DIFFICULT");
    srand(time(0));
    random_shuffle(words.begin(),words.end());
    const string THE_WORD=words[0];
    int wrong=0;
    string soFar(THE_WORD.size(),'-');
    string used="";
   
   
   
    cout
顶一下(33 写日记 1169649 227091
分享排行

 

 

留住已经逝去的峥嵘岁月 记住曾经绽现的万种风情 在记忆即将淡漠的时候 来把这些重新回味

Copyright (C) 2008-2014 www.juexiang.com, All Rights Reserved.

京ICP备2023001011号-3   京公网安备11010802011908号

客服QQ 1017160561 违法和不良信息举报电话 13148464312 邮箱 1017160561@qq.com