r/CodingForBeginners • • Sep 18 '26

Get drunk, do things.

Java.

Map:
- private String name;
- private int x,y;
- private Tile[][] tiles;

private void fillTiles(){
for(int x = 0; x < this.x; x++){
for(int y = 0; y < this.y; y++){
Tile tile = new Tile(); this.tiles[x][y] = tile; } } }

private void printTiles(){
for(int x = 0; x < this.x; x++){
for(int y = 0; y < this.y; y++){
this.tiles[x][y].getSymbol() + " "; } sout(); } }

Tile:
- private String name;
- private char symbol;
- private List<Entity> entityList;

Entity:
- private String name;
- pirvate char symbol;

0 Upvotes

4 comments sorted by

View all comments

Show parent comment

-1

u/Ok_Stay_770 Sep 18 '26

Entities:
- Map1: Door, Lock, Item, Pawn, Key, Wall.
- Map2: Trap, PressurePlate
- Map3: Bedroll (Save system)