File tree 2 files changed +42
-10
lines changed
2 files changed +42
-10
lines changed Original file line number Diff line number Diff line change
1
+ namespace Generator
2
+ {
3
+ internal class Comperator
4
+ {
5
+ private readonly int _guid ;
6
+
7
+ public Comperator ( int guid )
8
+ {
9
+ _guid = guid ;
10
+ }
11
+
12
+ public static string Get ( ) => "Buzz" ;
13
+
14
+ public string GetComperator ( ) => "Fizz" ;
15
+
16
+ //public const char[] NotTheAlphabet = new char[]
17
+ //{
18
+
19
+ //}
20
+ }
21
+ }
Original file line number Diff line number Diff line change 1
- namespace FizzBuzzRefucktoring ;
1
+ using Generator ;
2
2
3
- public static class FizzBuzzGenerator
3
+ namespace Generater ;
4
+
5
+ public static class RepositoryGenerator
4
6
{
5
- public static string Generate ( int number )
7
+ public static string Value => Comperator . Get ( ) ;
8
+
9
+ /// <summary>
10
+ /// Loads two numbers from database and compares them.
11
+ /// </summary>
12
+ /// <param name="id">UserId as utf-32 character string. (Emojies are supported too 😍)</param>
13
+ /// <returns></returns>
14
+ public static string Save ( int id )
6
15
{
7
- if ( number % 3 == 0 && number % 5 == 0 )
16
+ var comperator = new Comperator ( id ) ;
17
+
18
+ if ( id % 3 == 0 && id % 5 == 0 )
8
19
{
9
- return "FizzBuzz ";
20
+ return $ " { comperator . GetComperator ( ) } { Value } ";
10
21
}
11
- else if ( number % 3 == 0 )
22
+ else if ( id % 3 == 0 )
12
23
{
13
- return "Fizz" ;
24
+ return comperator . GetComperator ( ) ;
14
25
}
15
- else if ( number % 5 == 0 )
26
+ else if ( id % 5 == 0 )
16
27
{
17
- return "Buzz" ;
28
+ return Comperator . Get ( ) ;
18
29
}
19
30
else
20
31
{
21
- return number . ToString ( ) ;
32
+ return id . ToString ( ) ;
22
33
}
23
34
}
24
35
}
You can’t perform that action at this time.
0 commit comments