This is a Java-implemented Maze Game. I will upload some demo pictures later here.
World (click to expand/hide)
This class represents the world of the game.
Fields
-
public TETile[][] world;The array storing the information of the world. -
public Player player;The player instance of the game. -
public Player player2 = null;The second player (if any). -
private int roomNum;The number of rooms in the world, generated randomly. -
private ArrayList<Room> rooms;The array storing all instances of rooms. -
private char theme;The theme of the world.'r' means vigorous (red)
'y' means luminous (yellow)
'g' means vivid (green)
'b' means genuine (blue)
'p' means violet
'w' means simple (white)
-
public Long seed;The seed of the game. -
public Random random; -
private static final int len = 100;The column number of the world. -
private static final int wid = 100;The row number of the world.
Player (click to expand/hide)
This class represents the player of the game.
Fields
-
private int x;The x-coordinate of the player. -
private int y;The y-coordinate of the player. -
private String appearence = "$";The character represents the avatar, can be chosen by the user. The default (if not chosen) is "$". -
private String name = "Jedi";The name of the avatar, can be designed by the user. The default (if no input is offered) is "Jedi". -
private int color = ...;The color of the avatar, can be chosen by the user. The default (if not chosen) is ....
Room (click to expand/hide)
This class represents the room of the world.
Fields
-
private int x;The x-coordinate of the room. -
private int y;The y-coordinate of the room.The position is ggenerated randomly.
-
private int doorX;The x-coordinate of the room door. -
private int doorY;The y-coordinate of the room door.The door is embeded in the wall surrounding the room, with its position generated randomly.
-
private int len;The half of column number of the room. -
private int wid;The half of row number of the room.The size is generated randomly.
-
private int ...;
proj3
├── PlusWorld
│ ├── BoringWorldDemo.java
│ └── RandomWorldDemo.java
├── README.md
├── byow
│ ├── Core
│ │ ├── Engine.java
│ │ ├── Main.java
│ │ └── RandomUtils.java
│ ├── InputDemo
│ │ ├── DemoInputSource.java
│ │ ├── InputSource.java
│ │ ├── KeyboardInputSource.java
│ │ ├── RandomInputSource.java
│ │ └── StringInputDevice.java
│ └── TileEngine
│ ├── TERenderer.java
│ ├── TETile.java
│ └── Tileset.java
└── byowTools
├── RandomUtils.java
└── TileEngine
├── TERenderer.java
├── TETile.java
└── Tileset.java