chore: Minor changes
This commit is contained in:
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Terminal Game
|
||||
|
||||
A multiplayer terminal-based game built with Java, utilizing WebSockets for communication and Lanterna for the text-based user interface.
|
||||
|
||||
## Project Structure
|
||||
|
||||
* **game**: Client application (TUI).
|
||||
* **server**: WebSocket server.
|
||||
* **common**: Shared libraries and logic.
|
||||
|
||||
## Requirements
|
||||
|
||||
* Java 25
|
||||
* Maven
|
||||
|
||||
## How to Run
|
||||
|
||||
1. Build the project:
|
||||
```bash
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
2. Start the server:
|
||||
```bash
|
||||
mvn compile exec:java -pl server -am
|
||||
```
|
||||
|
||||
3. Start the client (in a new terminal):
|
||||
```bash
|
||||
mvn compile exec:java -pl game -am
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
package cz.jzitnik.client.game.items.types;
|
||||
|
||||
public class BeastSkin implements ItemType<BeastSkin> {
|
||||
@Override
|
||||
public Class<BeastSkin> getItemType() {
|
||||
return BeastSkin.class;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,9 @@ import cz.jzitnik.client.game.items.types.weapons.Sword;
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Food.class, name = "food"),
|
||||
@JsonSubTypes.Type(value = Sword.class, name = "weapon_sword"),
|
||||
@JsonSubTypes.Type(value = Junk.class, name = "junk")
|
||||
@JsonSubTypes.Type(value = Junk.class, name = "junk"),
|
||||
@JsonSubTypes.Type(value = Key.class, name = "key"),
|
||||
@JsonSubTypes.Type(value = BeastSkin.class, name = "beast_skin"),
|
||||
})
|
||||
public interface ItemType<T> {
|
||||
Class<T> getItemType();
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package cz.jzitnik.client.game.items.types;
|
||||
|
||||
public class Key implements ItemType<Key> {
|
||||
@Override
|
||||
public Class<Key> getItemType() {
|
||||
return Key.class;
|
||||
}
|
||||
}
|
||||
@@ -75,15 +75,15 @@
|
||||
answers:
|
||||
- answer: "I have it"
|
||||
requirement:
|
||||
item: "quest_item_boss_skin"
|
||||
item: "BeastSkin"
|
||||
dialog:
|
||||
text: "Well done. Here is the key."
|
||||
onEnd:
|
||||
type: "give_item"
|
||||
item:
|
||||
id: 800
|
||||
name: "Something"
|
||||
type: { name: "junk" }
|
||||
name: "Key"
|
||||
type: { name: "key" }
|
||||
texture: "APPLE"
|
||||
then: { type: end }
|
||||
- answer: "Not yet"
|
||||
@@ -114,7 +114,7 @@
|
||||
itemsDrops:
|
||||
- id: 200
|
||||
name: "Beast Skin"
|
||||
type: { name: "junk" }
|
||||
type: { name: "beast_skin" }
|
||||
texture: "BOSS_SKIN"
|
||||
tasks:
|
||||
- type: "following_player"
|
||||
@@ -137,11 +137,8 @@
|
||||
- id: "final_room"
|
||||
texture: "ROOM6"
|
||||
requirement:
|
||||
item: "quest_item_final_key"
|
||||
item: "Key"
|
||||
end: true
|
||||
#objects:
|
||||
# - objectType: "exit"
|
||||
# cords: { x: 140, y: 40 }
|
||||
west: null
|
||||
east: null
|
||||
north: null
|
||||
|
||||
Reference in New Issue
Block a user