Skip to content

Commit 4db8e64

Browse files
committed
Added test cases to 100 doors, 99 bottles, bogo sort, bubble sort, selection sort
Fixed typo in 99 bottles
1 parent 97720e3 commit 4db8e64

6 files changed

Lines changed: 116 additions & 1 deletion

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package ;
2+
import neko.Lib;
3+
import Factorial;
4+
5+
/**
6+
* @author Tyler Pond AKA Wayfur
7+
*/
8+
9+
class Main
10+
{
11+
12+
static function main()
13+
{
14+
var doors = new Doors(100);
15+
16+
#if neko
17+
Lib.print(doors);
18+
#else
19+
trace(doors);
20+
#end
21+
}
22+
23+
}

99_Bottles_Problem/Haxe/Wayfur/Bottles.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Bottles
2121
{
2222
trace(bottles + " bottles of beer on the wall, " + bottles + " bottles of beer");
2323
bottles -= 1;
24-
trace("Take one down and pass it around, " + bottles + " of beer on the wall");
24+
trace("Take one down and pass it around, " + bottles + " bottles of beer on the wall");
2525
}
2626
trace("No more bottles of beer on the wall, no more bottles of beer.");
2727
trace("Go to the store and buy some more, 99 bottles of beer on the wall.");
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package ;
2+
import neko.Lib;
3+
import Factorial;
4+
5+
/**
6+
* @author Tyler Pond AKA Wayfur
7+
*/
8+
9+
class Main
10+
{
11+
12+
static function main()
13+
{
14+
var bottles = new Bottles(99);
15+
16+
#if neko
17+
Lib.print(bottles);
18+
#else
19+
trace(bottles);
20+
#end
21+
}
22+
23+
}

Bogosort/Haxe/Wayfur/Main.hx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package ;
2+
import neko.Lib;
3+
import Factorial;
4+
5+
/**
6+
* @author Tyler Pond AKA Wayfur
7+
*/
8+
9+
class Main
10+
{
11+
12+
static function main()
13+
{
14+
var bogo = new Bogosort([999,47,12,1,36,987,677,513,514]);
15+
16+
#if neko
17+
Lib.print(bogo);
18+
#else
19+
trace(bogo);
20+
#end
21+
}
22+
23+
}

Bubble_Sort/Haxe/Wayfur/Main.hx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package ;
2+
import neko.Lib;
3+
import Factorial;
4+
5+
/**
6+
* @author Tyler Pond AKA Wayfur
7+
*/
8+
9+
class Main
10+
{
11+
12+
static function main()
13+
{
14+
var bubble = new BubbleSort([999,47,12,1,36,987,677,513,514,654,412]);
15+
16+
#if neko
17+
Lib.print(bubble);
18+
#else
19+
trace(bubble);
20+
#end
21+
}
22+
23+
}

Selection_Sort/Haxe/Wayfur/Main.hx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package ;
2+
import neko.Lib;
3+
import Factorial;
4+
5+
/**
6+
* @author Tyler Pond AKA Wayfur
7+
*/
8+
9+
class Main
10+
{
11+
12+
static function main()
13+
{
14+
var selection = new SelectionSort([999,47,12,1,36,987,677,513,514,654,412]);
15+
16+
#if neko
17+
Lib.print(selection);
18+
#else
19+
trace(selection);
20+
#end
21+
}
22+
23+
}

0 commit comments

Comments
 (0)