-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathPlaySnakeNLadder.java
30 lines (27 loc) · 1.02 KB
/
PlaySnakeNLadder.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Games.SnakeLadder.Game;
import Games.SnakeLadder.Ladder;
import Games.SnakeLadder.Player;
import Games.SnakeLadder.Snake;
public class PlaySnakeNLadder {
public static void main(String[] args) {
System.out.println("Hello world!");
// ---------------- SNAKE & LADDER GAME ------------- //
Game snakeLadder = new Game.GameBuilder()
.addPlayer(new Player("TangoRishi"))
.addPlayer(new Player("CompetitiveBlood"))
.addLadder(new Ladder(3,80))
.addLadder(new Ladder(12, 81))
.addLadder(new Ladder(45, 82))
.addLadder(new Ladder(69, 83))
.addSnake(new Snake(73, 1))
.addSnake(new Snake(12, 3))
.build();
snakeLadder
.playNext().playNext()
.playNext().playNext()
.playNext().playNext()
.playNext().playNext()
.playNext().playNext()
.playNext().playNext();
}
}