Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*static int[] elso_sor = new int[8] { 1, 2, 3, 4, 5, 6, 7, 8 };
- static int[] masodik_sor = new int[8] { 9, 10, 11, 12, 13, 14, 15, 16 };
- static int[] harmadik_sor = new int[8] { 17, 18, 19, 20, 21, 22, 23, 24 };
- static int[] negyedik_sor = new int[8] { 17, 18, 19, 20, 21, 22, 23, 24 };*/
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- namespace ConsoleApp2
- {
- class Program
- {
- static int vajonezjoe = 0;
- static int jelenleg = 30;
- static int[] history = new int[10] { 30, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- static int hovamegyunk = 0;
- static int[,] tabla = new int[4, 8] { { 1, 2, 3, 4, 5, 6, 7, 8 }, { 9, 10, 11, 12, 13, 14, 15, 16 }, { 17, 18, 19, 20, 21, 22, 23, 24 }, { 25, 26, 27, 28, 29, 30, 31, 32 } };
- private static void Main()
- {
- Design();
- Tabla_Kiiratasa();
- Varakoztatas();
- }
- #region Dizánj
- static void Design()
- {
- Console.Title = "Vadász Dénes Programozói Verseny immune.space";
- Console.ForegroundColor = ConsoleColor.Green;
- Console.BackgroundColor = ConsoleColor.Black;
- }
- #endregion
- #region Várakoztatás
- static void Varakoztatas()
- {
- Console.ReadKey();
- Environment.Exit(0x00);
- }
- #endregion
- static void Tabla_Kiiratasa()
- {
- for (int i = 0; i < tabla.GetLength(0); i++)
- {
- if (i > 0)
- {
- Console.Write("\n\n");
- }
- for (int j = 0; j < tabla.GetLength(1); j++)
- {
- if (tabla[i, j] != 30)
- {
- Console.Write("\t" + tabla[i, j]);
- }
- else if (tabla[i, j] == 30)
- {
- Console.ForegroundColor = ConsoleColor.Red;
- Console.Write("\t" + tabla[i, j]);
- Console.ForegroundColor = ConsoleColor.Green;
- }
- }
- }
- Hova_Akarunk_Menni();
- }
- static void Hova_Akarunk_Menni()
- {
- Console.Write("\n\nAdja meg a mező számát amire lépni akar: ");
- hovamegyunk = Convert.ToInt32(Console.ReadLine());
- vajonezjoe = jelenleg - hovamegyunk;
- if (jelenleg == 1 && jelenleg == 9 && jelenleg == 17 && jelenleg == 25)//balszel
- {
- if (vajonezjoe != 7 && vajonezjoe != 8)
- {
- Console.Write(vajonezjoe);
- Console.Write("\n\nAnyád picsája it's a trap5");
- Hova_Akarunk_Menni();
- }
- }
- if (jelenleg == 8 && jelenleg == 16 && jelenleg == 24 && jelenleg == 32)//jobbszel
- {
- if (vajonezjoe != 8 && vajonezjoe != 9)
- {
- Console.Write(vajonezjoe);
- Console.Write("\n\nAnyád picsája it's a trap6");
- Hova_Akarunk_Menni();
- }
- }
- if (vajonezjoe != 7 && vajonezjoe != 8 && vajonezjoe != 9)
- {
- Console.Write(vajonezjoe);
- Console.Write("\n\nAnyád picsája it's a trap1");
- Hova_Akarunk_Menni();
- }
- if (hovamegyunk > jelenleg)
- {
- Console.Write("\n\nAnyád picsája it's a trap2");
- Hova_Akarunk_Menni();
- }
- if (hovamegyunk == 12 || hovamegyunk == 4 || hovamegyunk == 7)
- {
- Console.Write("\n\nAnyád picsája it's a trap3");
- Hova_Akarunk_Menni();
- }
- //Console.Clear();
- for (int i = 0; i < tabla.GetLength(0); i++)
- {
- if (i > 0)
- {
- Console.Write("\n\n");
- }
- for (int j = 0; j < tabla.GetLength(1); j++)
- {
- if (tabla[i, j] != hovamegyunk)
- {
- Console.Write("\t" + tabla[i, j]);
- }
- else if (tabla[i, j] == hovamegyunk)
- {
- Console.ForegroundColor = ConsoleColor.Red;
- Console.Write("\t" + tabla[i, j]);
- Console.ForegroundColor = ConsoleColor.Green;
- }
- }
- }
- if (hovamegyunk == 2)
- {
- Varakoztatas();
- }
- else
- {
- jelenleg = hovamegyunk;
- Console.Write(" " + vajonezjoe);
- Hova_Akarunk_Menni();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement