Computing > Programming

Console Animation C#

(1/1)

etnel:
Any ideas of how I would make a "Cube" bounce from the right->left->up->down in a loop. Similar to the "DVD-animation" but it does not need to bounce off random values. I would like the code as short as possible.

The "Cube" is a 3x3 of "#".
# # #
# # #
# # #

etnel:

--- Code: ---static void DrawTop(int space)
        {
            for (int i = 0; i < space; i++)
            {
                Console.WriteLine();
            }

            Console.Write("# # #");
            Console.WriteLine();
            Console.Write("# # #");
            Console.WriteLine();
            Console.Write("# # #");
        }
--- End code ---
Added top to bottom. Pretty much figured out everything. If anyone sees a way to improve, please let me know.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version