You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.5 KiB
55 lines
1.5 KiB
//Importiere wichtige Bibliotheken
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
//Definiere Feldgröße
|
|
#define ROWS 6
|
|
#define COLS 7
|
|
|
|
// Definiere Farben
|
|
#define RESET_COLOR "\033[0m"
|
|
#define BLACK "\033[0;30m"
|
|
#define RED "\033[0;31m"
|
|
#define GREEN "\033[0;32m"
|
|
#define YELLOW "\033[0;33m"
|
|
#define BLUE "\033[0;34m"
|
|
#define MAGENTA "\033[0;35m"
|
|
#define CYAN "\033[0;36m"
|
|
#define WHITE "\033[0;37m"
|
|
|
|
|
|
//Funktionsprototyp für initializeBoard
|
|
void initializeBoard(char board[ROWS][COLS]);
|
|
|
|
//Funktionsprototyp für printBoard
|
|
void printBoard(char board[ROWS][COLS]);
|
|
|
|
// Funktionsprototyp für clearScreen
|
|
void clearScreen();
|
|
|
|
//Funktionsprototyp für isColumnFull
|
|
int isColumnFull(char board[ROWS][COLS], int col);
|
|
|
|
//Funktionsprototyp für dropPiece
|
|
int dropPiece(char board[ROWS][COLS], int col, char player);
|
|
//Funktionsprototyp für checkWin
|
|
int checkWin(char board[ROWS][COLS], char player);
|
|
// Funktionsprototyp für checkHorizontal
|
|
int checkHorizontal(char board[ROWS][COLS], char player);
|
|
|
|
// Funktionsprototyp für checkVertical
|
|
int checkVertical(char board[ROWS][COLS], char player);
|
|
|
|
// Funktionsprototyp für checkDiagonalLR
|
|
int checkDiagonalLR(char board[ROWS][COLS], char player);
|
|
|
|
// Funktionsprototyp für checkDiagonalRL
|
|
int checkDiagonalRL(char board[ROWS][COLS], char player);
|
|
|
|
// Funktionsprototyp für showMessage
|
|
void showMessage(const char* messageColor, const char* message);
|
|
//Funktionsprototyp für showInvalidInputMessage
|
|
void showInvalidInputMessage();
|
|
|
|
//Funktionsprototyp für showColumnFullMessage
|
|
void showColumnFullMessage();
|