⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 words.h

📁 Since the field of object oriented programming is probably new to you, you will find that there is a
💻 H
字号:
// This class reads and parses the user input, checks that a valid
//  verb has been input, and checks for a valid noun.

#ifndef WORDS_H
#define WORDS_H

#include "flyaway.h"

class words 
{
   enum word verb;
   enum word noun;
   void read_a_line(word &wd1, word &wd2);
   int get_an_ASCII_word(char in_string[]);
   int find_in_dictionary(char in_string[]);
   int is_a_verb(enum word input_word);
   int is_a_noun(enum word input_word);
   int is_a_direction(enum word input_word);
   int is_an_operation(enum word input_word);

public:

   void get_command(void);
   enum word get_verb(void)  { return verb; };
   enum word get_noun(void)  { return noun; };
   int is_a_verb(void)       { return is_a_verb(verb); };
   int is_a_noun(void)       { return is_a_noun(noun); };
   int is_a_direction(void)  { return is_a_direction(verb); };
   int is_an_operation(void) { return is_an_operation(verb); };
   void stop_game(void)      { verb = quit; };

};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -