Linux graphical interface ghost tower source program (c, oop)

Source: Internet
Author: User
Linux graphic interface (oop)-Linux general technology-Linux programming and kernel information-refer to the following for details. Compilation instructions:

Test the compiling environment: ubuntu linux 7.10 (kernel version 2.6.22), gcc, and surese graphics library support (please refer to surese related materials)

Graphical interface requirement: Compile command: gcc shell. c ai. c graphics. c-o h. out-l curses
Shell. c // open the file # include "datastruct. h" to # include "graphics. h"
Ai. h // open the file # include "datastruct. h" to # include "graphics. h"
Ai. c
Graphics. h
Graphics. c

Character interface requirement: Compile command: gcc shell. c ai. c datastruct. c-o h. out
Shell. c // reverse returns the same as above
Ai. h
Ai. c // comment out the endwin () of lines 11 and 17 ();
Datastruct. h
Datastruct. c

Source program

Program Composition:
The program has two sets of optional solutions.
1: character interface, which only involves internal operations.
2: graphic interface, with real-time graphical display function.

File description:
Design Concept: Driver> Intelligent Simulation> operation object
General part:
Shell. c: shell. The organization program runs and checks user input data;

Ai. h: Smart simulation-mobile tower;
Ai. c <由ai.h导出> ;

Solution 1: character Interface
Datastruct. h: entity simulation of the tower-structure and operations that can be performed on the tower ;
Datastruct. c: Implementation of the tower structure and operations that can be performed <由datastruct.h导出> ;
Solution 2: graphic interface
Graphics. h: entity simulation of the tower-structure and operations that can be performed on the tower ;
Graphics. c: entity simulation of the tower-structure and operations that can be performed on the tower ;
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.