File tree Expand file tree Collapse file tree 1 file changed +33
-2
lines changed
Animation/ConsoleAnimation Expand file tree Collapse file tree 1 file changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ class MatrixAnimation
7
7
readonly char b = '*' ;
8
8
readonly int m = Console . CursorLeft ;
9
9
readonly int n = Console . CursorTop ;
10
- int y = 0 ;
11
- int z = 0 ;
10
+ int y = 0 ;
11
+ int z = 0 ;
12
12
readonly char [ , ] A = new char [ 15 , 100 ] ;
13
13
14
14
void View_1 ( char [ , ] c )
@@ -56,5 +56,36 @@ void View_2(char[,] c)
56
56
57
57
}
58
58
}
59
+
60
+ void Show_1 ( object o )
61
+ {
62
+
63
+ for ( int i = 0 ; i < A . GetLength ( 0 ) ; i ++ )
64
+ {
65
+ for ( int j = 0 ; j < A . GetLength ( 1 ) ; j ++ )
66
+ {
67
+ Console . ForegroundColor = ConsoleColor . Red ;
68
+ Console . Write ( A [ i , j ] ) ;
69
+ }
70
+ Console . WriteLine ( ) ;
71
+ }
72
+
73
+ Console . SetCursorPosition ( m , n ) ;
74
+ }
75
+ void ShowEmpty ( char [ , ] c )
76
+ {
77
+ for ( int i = 0 ; i < c . GetLength ( 0 ) ; i ++ )
78
+ {
79
+ for ( int j = 0 ; j < c . GetLength ( 1 ) ; j ++ )
80
+ {
81
+ c [ i , j ] = ' ' ;
82
+
83
+ }
84
+ Console . WriteLine ( ) ;
85
+ }
86
+
87
+ Console . SetCursorPosition ( m , n ) ;
88
+ }
89
+
59
90
}
60
91
}
You can’t perform that action at this time.
0 commit comments