![]() |
4-gewinnt
1.0.0
Klassiker "4-gewinnt" als Konsolenanwendung
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
gehe zum Quellcode dieser Datei
Funktionen | |
void | drawLeftArrow (char *menu, int pPos) |
void | drawRightArrow (char *menu, int pPos) |
void | drawMainMenu (int pPos) |
int | mainMenu () |
void | mainMenuReactToEnter (int pPos) |
void drawLeftArrow | ( | char * | menu, |
int | pPos | ||
) |
This method manipulates the array so the left arrow (to indicate the cursor position) is added to the array.
menu | contains the pointer to the char-array containing main menu in it's current status |
pPos | contains the cursor Position of the cursor |
Definiert in Zeile 11 der Datei mainMenu.c.
Wird benutzt von drawMainMenu().
void drawMainMenu | ( | int | pPos | ) |
This method is responsible for drawing the mainMenu The raw form of the menu is defined here–>it can not be changed easily because the array size is dependent on the length of the String
pPos | current position of cursor within mainMenu |
mainMenu | the char Array containing the mainMenu |
every Menu gets 21 Chars–>each entry starts with 3 spaces followed by the menu entry followed by some spaces to fill up the array till the end and then the line break("\n")
Definiert in Zeile 39 der Datei mainMenu.c.
Benutzt drawLeftArrow(), drawRightArrow(), flushBuffer(), mainMenu(), output(), setLineAlign() und startBuffer().
Wird benutzt von mainMenu().
void drawRightArrow | ( | char * | menu, |
int | pPos | ||
) |
This method manipulates the array so the right arrow (to indicate the cursor position) is added to the array.
menu | contains the pointer to the char-array containing main menu in it's current status |
pPos | contains the cursor Position of the cursor |
Definiert in Zeile 24 der Datei mainMenu.c.
Wird benutzt von drawMainMenu().
int mainMenu | ( | ) |
con | |
pPos |
Definiert in Zeile 62 der Datei mainMenu.c.
Benutzt animateBanner(), animateBox(), con, drawMainMenu() und mainMenuReactToEnter().
Wird benutzt von drawMainMenu() und main().
void mainMenuReactToEnter | ( | int | pPos | ) |
this method handles the game flow by calling the function corresponding to the cursor posotion within the menu
pPos | contains the current position (0:Top,4:bottom) |
Definiert in Zeile 115 der Datei mainMenu.c.
Benutzt con, flushBuffer(), gameFunction(), NO_HIGHLIGHT, output(), showCredits(), showHallOfShame(), showRules() und startBuffer().
Wird benutzt von mainMenu().