From 44a173d2504df893987ebfff3ce50850b3fc6145 Mon Sep 17 00:00:00 2001 From: Harry121199 Date: Thu, 19 Oct 2023 08:05:42 +0530 Subject: [PATCH] Added Letter K to starwar --- Fonts/starwar/starwar.h | 79 ++++++++++++++++++++--------------------- example.cpp | 4 +-- 2 files changed, 40 insertions(+), 43 deletions(-) diff --git a/Fonts/starwar/starwar.h b/Fonts/starwar/starwar.h index 1f0289d9..a900e8ac 100644 --- a/Fonts/starwar/starwar.h +++ b/Fonts/starwar/starwar.h @@ -94,7 +94,7 @@ class Starwar : public Fonts char **G() { - char **character = getCharGrid(6,10); + char **character = getCharGrid(6, 10); character[0][2] = character[0][3] = character[0][4] = character[0][5] = character[0][6] = character[0][7] = character[0][8] = character[1][4] = character[1][5] = character[1][6] = character[1][7] = character[1][8] = character[2][6] = character[2][7] = character[3][6] = character[4][4] = character[4][5] = character[5][2] = character[5][3] = character[5][4] = character[5][5] = character[5][6] = character[5][7] = '_'; character[1][1] = '/'; @@ -138,16 +138,20 @@ class Starwar : public Fonts return character; } - /* - char **K() - { - char **character = getCharGrid(ROWS,COLS); + char **K() + { + char **character = getCharGrid(6, 8); - //Enter the character grid in ROWS X COLS + character[1][0] = character[2][0] = character[3][0] = character[4][0] = character[5][0] = character[1][3] = character[5][3] = '|'; + character[0][1] = character[0][2] = character[0][5] = character[0][6] = character[0][7] = character[5][1] = character[5][2] = character[5][5] = character[5][6] = character[5][7] = '_'; + character[2][3] = '\''; + character[4][3] = '.'; + character[3][5] = '<'; + character[1][4] = character[1][7] = character[2][6] = '/'; + character[5][4] = character[5][7] = character[4][6] = '\\'; - return character; - } - */ + return character; + } char **L() { @@ -329,21 +333,18 @@ class Starwar : public Fonts return character; } - - char **Y() - { - char **character = getCharGrid(6,13); - - //Enter the character grid in ROWS X COLS - character[0][1] = character[0][2] = character[0][3] = character[0][0] = character[0][8] = character[0][9] = character[0][10] = character[0][11] = character[3][3] = character[3][8] = character[5][5] = character[5][6] = '_'; - character[1][0] = character[2][1] = character[3][2] = character[1][4] = character[2][5] = '\\'; - character[1][7] = character[2][6] = character[1][11] = character[2][10] = character[3][9] = '/'; - character[4][4] = character[5][4] = character[4][7] = character[5][7] = '|'; + char **Y() + { + char **character = getCharGrid(6, 13); + // Enter the character grid in ROWS X COLS + character[0][1] = character[0][2] = character[0][3] = character[0][0] = character[0][8] = character[0][9] = character[0][10] = character[0][11] = character[3][3] = character[3][8] = character[5][5] = character[5][6] = '_'; + character[1][0] = character[2][1] = character[3][2] = character[1][4] = character[2][5] = '\\'; + character[1][7] = character[2][6] = character[1][11] = character[2][10] = character[3][9] = '/'; + character[4][4] = character[5][4] = character[4][7] = character[5][7] = '|'; - return character; - } - + return character; + } /* char **Z() @@ -358,10 +359,9 @@ class Starwar : public Fonts // Lowercase - char **a() { - char **character = getCharGrid(6,13); + char **character = getCharGrid(6, 13); character[5][0] = character[4][1] = character[3][2] = character[2][3] = character[1][4] = character[5][3] = character[3][5] = '/'; character[1][8] = character[2][9] = character[3][10] = character[4][11] = character[5][12] = character[3][7] = character[5][9] = '\\'; @@ -737,23 +737,20 @@ class Starwar : public Fonts return character; } - - char **six() - { - char **character = getCharGrid(6,7); - - //Enter the character grid in ROWS X COLS - character[0][3] = character[0][4] = character[2][4] = character[3][3] = character[4][3] = character[5][2] = character[5][3] = character[5][4] = '_'; - character[1][2] = character[1][4] = character[2][1] = character[2][3] = character[5][5] = '/'; - character[3][0] = character[4][0] = character[4][6] = '|'; - character[3][5] = character[5][1] = '\\'; - character[4][2] = '('; - character[4][4] = ')'; - character[3][2] = '.'; - return character; - } + char **six() + { + char **character = getCharGrid(6, 7); - + // Enter the character grid in ROWS X COLS + character[0][3] = character[0][4] = character[2][4] = character[3][3] = character[4][3] = character[5][2] = character[5][3] = character[5][4] = '_'; + character[1][2] = character[1][4] = character[2][1] = character[2][3] = character[5][5] = '/'; + character[3][0] = character[4][0] = character[4][6] = '|'; + character[3][5] = character[5][1] = '\\'; + character[4][2] = '('; + character[4][4] = ')'; + character[3][2] = '.'; + return character; + } char **seven() { @@ -765,7 +762,7 @@ class Starwar : public Fonts return character; } - char **eight() + char **eight() { char **character = getCharGrid(); // Enter the character grid in ROWS X COLS diff --git a/example.cpp b/example.cpp index ae85b97e..9f7d59fe 100644 --- a/example.cpp +++ b/example.cpp @@ -5,7 +5,7 @@ using namespace ascii; int main() { - Ascii a = Ascii(carlos); - a.print("J"); + Ascii a = Ascii(starwar); + a.print("K"); return 0; } \ No newline at end of file