📄 discription.h
字号:
/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 10.2003 Lchrennew Personal. //
// All rights reserved. //
// Lchrennew个人 版权所有 不得抄袭 违者必究 //
/////////////////////////////////////////////////////////////////////////////
#include "Queens.h"
#include "iostream.h"
#include "conio.h"
#include <ctype.h>
////////////Message functions///////////
void Copyright()
{
//textcolor(GREEN);
cout<<"╔══════════════════════════════════╗"<<endl
<<"║ Copyright (c) 10.2003 Lchrennew Personal. ║"<<endl
<<"║ All rights reserved ║"<<endl
<<"║ Solve Queens v1.0.0.1 ║"<<endl
<<"║ E-MAIL:lchrennew@mail.biti.edu.cn ║"<<endl
<<"╚══════════════════════════════════╝"<<endl;
}
void fList()
{
cout<<endl<<"┌────────────────────────┐"
<<endl<<"│ FUNCTIONS LIST │"
<<endl<<"├─────┬──────────────────┤"
<<endl<<"│ ? │ -HELP and ABOUT │"
<<endl<<"│ S │ -Start to Solving │"
<<endl<<"│ Q │ -QUIT │"
<<endl<<"└─────┴──────────────────┘"
<<endl;
}
/////////////functions//////////////
int Option(char f)
{
if((f=='q')||(f=='Q'))
return 0;
do
{
switch(f)
{
case '?':
//discription(); //输出帮助信息
//cout<<"\nPress Any KEY to next page!\n"<<endl;
//while(!kbhit());
Copyright();
cout<<"\nPress Any KEY to next page!\n"<<endl;
while(!kbhit());
fList();
cout<<"\nPress Any KEY to next page!\n"<<endl;
while(!kbhit());
//oList();
break;
case 'Q':
break;
case 'q':
break;
case 'S':;
case 's':
char ch;
int size;
cout<<endl;
cout << "Type your chessboard size here!"<<endl<<"size = ";
cin>>ch;
while(!isdigit(ch)||(ch=='0'))
{
cout<<"Error Input,Please type a Integer larger than ZERO:"<<endl<<"size =";
cin>>ch;
};
cin.putback(ch);
cin>>size;
Queens configuration(size);
configuration.start =clock();
while(!configuration.solve_from ());
break ;
}
cout<<endl<<"Please choose your choice"
<<endl<<"[?=help/S=solve/Q=quit]"
<<endl<<">";
do
{
cin>>f;
}while((f!='Q')&&(f!='S')&&(f!='q')&&(f!='s')&&(f!='?'));
}while((f!='q')&&(f!='Q'));
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -