table
This commit is contained in:
parent
3fce97aa4a
commit
b9b0d8f815
@ -1,4 +1,4 @@
|
||||
echo "BUILDING LOGIC"
|
||||
clang ./logic.c ./logic_symb.c ./logic_run.c ./logic_ops.c ./logic_karn.c -o ./logic.elf
|
||||
echo "LOGIC HAS BEEN BUILT - NOW WE GONNA RUN IT"
|
||||
./logic
|
||||
./logic.elf
|
@ -11,11 +11,44 @@ void logic_karn_render(bool* karn, int x, int y)
|
||||
{
|
||||
bool *c = karn;
|
||||
|
||||
printf("| ");
|
||||
|
||||
for (int iy = 0; iy < y; iy++)
|
||||
{
|
||||
if (y == 2)
|
||||
{
|
||||
printf("| %d ", (logic_karn_1_gray[iy] & (1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("|%d%d ", (logic_karn_2_gray[iy] & (1 << 0)), ((logic_karn_2_gray[iy] & (1 << 1)) / 2));
|
||||
}
|
||||
}
|
||||
|
||||
printf("|\n");
|
||||
|
||||
for (int ix = 0; ix < x; ix++)
|
||||
{
|
||||
if (x == 2)
|
||||
{
|
||||
printf("| %d ", (logic_karn_1_gray[ix] & (1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("|%d%d ", (logic_karn_2_gray[ix] & (1 << 0)), ((logic_karn_2_gray[ix] & (1 << 1)) / 2));
|
||||
}
|
||||
|
||||
for (int iy = 0; iy < y; iy++)
|
||||
{
|
||||
printf("| %d ", *c);
|
||||
if (*c == 1)
|
||||
{
|
||||
printf("| 1 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("| ");
|
||||
}
|
||||
|
||||
c++; // lmao
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user