EG Information
Training Missions
Knowledge Bank
Pimp Us Out!
Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site And Create A Link Back To Enigma Group.
|
| |
|
|
Enigma Group's Code Bank
Matrix EffectBy: evisceration - Date Submitted: 2012-04-11 15:03:10 #define readkey using System; namespace m7tr1x { class Program { static void Main(string[] args) { Console.Title = "Matrix Effect!"; Console.ForegroundColor = ConsoleColor.DarkGreen; Console.WindowLeft = Console.WindowTop = 0; Console.WindowHeight = Console.BufferHeight = Console.LargestWindowHeight; Console.WindowWidth = Console.BufferWidth = Console.LargestWindowWidth; #if readkey Console.WriteLine("Press any key to begin!"); Console.ReadKey(); #endif Console.CursorVisible = false; int width, height; int[] y; int[] l; Initialize(out width, out height, out y, out l); int ms; while (true) { DateTime t1 = DateTime.Now; MatrixStep(width, height, y, l); ms = 10 - (int)((TimeSpan)(DateTime.Now - t1)).TotalMilliseconds; if (ms > 0) System.Threading.Thread.Sleep(ms); if (Console.KeyAvailable) if (Console.ReadKey().Key == ConsoleKey.F5) Initialize(out width, out height, out y, out l); } } static bool thistime = false; private static void MatrixStep(int width, int height, int[] y, int[] l) { int x; thistime = !thistime; for (x = 0; x < width; ++x) { if (x % 11 == 10) { if (!thistime) continue; Console.ForegroundColor = ConsoleColor.White; } else { Console.ForegroundColor = ConsoleColor.DarkGreen; Console.SetCursorPosition(x, inBoxY(y[x] - 2 - (l[x] / 40 * 2), height)); Console.Write(R); Console.ForegroundColor = ConsoleColor.Green; } Console.SetCursorPosition(x, y[x]); Console.Write(R); y[x] = inBoxY(y[x] + 1, height); Console.SetCursorPosition(x, inBoxY(y[x] - l[x], height)); Console.Write(' '); } } private static void Initialize(out int width, out int height, out int[] y, out int[] l) { int h1; int h2 = (h1 = (height = Console.WindowHeight) / 2) / 2; width = Console.WindowWidth - 1; int x; Console.Clear(); for (x = 0; x < width; ++x) { y[x] = r.Next(height); l[x] = r.Next(h2 * ((x % 11 != 10) ? 2 : 1), h1 * ((x % 11 != 10) ? 2 : 1)); } } static Random r = new Random (); static char R { get { int t = r.Next(10); if (t <= 2) return (char)('0' + r.Next(10)); else if (t <= 4) return (char)('a' + r.Next(27)); else if (t <= 6) return (char)('A' + r.Next(27)); else return (char)(r.Next(32, 255)); } } public static int inBoxY(int n, int height) { n = n % height; if (n < 0) return n + height; else return n; } } }
|
| Return to
csharp category list |
|
|
Who Visited EnigmaGroup Today?
1547 Guests, 156 Users (194 Spiders)
cls777, zediwon, tamari, zombiehack640, seichi, Red, proman, intersys, eusouumpeixe, rayomand, Spider web, yashganesh, Gh000st, GothicLogic, jax440, itsukiminami2, Doraga, dark_void, potato18, emeil, Nightraven, Laserman34170, revlis, theninjayistic, bhushanpatil12, milindsalvlve, tulu, sasuke, xthomd, Freshchris, rajivkelkar, bharatkumar, Priti Singh, maxsate, lolliver, anishthakur, ldg1992, jarlskov, LakhanRathi, edwin092, the mentor, panda_hacker, lithium_love, lirongbin123, Sooham, Abhinav2107, nerd, kurt_culley, vipro, ehkrin, ecokeco, wolfy1379, anandbhala, Kelionj, JaRam, HAcker2000, tdinsmoretuli, Anonymousfigure, ghost walker, SCBbestof, aelarbee, jp367, voldonp, mb4263, Arsenal, untchable, N4g4c3N, xsiemich, KIKNWING, negasora, LePhantom, TLH, Synthethic, ropopopo, LegitGlitcha, Tjm, 13thd4y, darthsmoot, huayra, KidNinja, kernel_mod, be3le3, Renack, Partisan, Javar2698, ktsukino, galuhiman, st3alth, kr1shn4murt1, VivisClone, brooks, Anonanonamous, WarSnail, InternetGuy123, Ausome1, killr00t, fulle294, Evil1, cobra, Vreality2007, cyberjin, cannonhead2, Slìmàgø, Repuhlsive, LWPiNDaHiZZY, akhil, DBD Darkened, l8nit3tr0ubl3, MaxMeier, Vidrion, d3krepit, Newd, NewdCouchGuy, fatal, 3v1l, cor3dump, ADV0CAT3, hackaday, Bahamut, Robbie, AlexDxel, Baboo123456, echo_steps, Arrow of time, Jos18, supermoore1025, apackofgiraffes, neverquit, Synick, tyzer200946, sweetkool1987, c0re, statix, raybendegun, mittal_palash, marco1548, r00t3r, nSoul, FalconHibiki, Annumbo, nh_99, itfact, NITINKNSL1, makler2004, JPMMaia, Megji, sernaval, Dcrypt3d, Hypertext, machile, Pelthrund, xxy143, sprx, HoerWing, wolfboy97, Tow |
| |
|
|
|
|
|