Tests out some new things

This commit is contained in:
2018-03-14 00:00:52 +01:00
parent b88f3c0ef4
commit 6a21332877
14 changed files with 131 additions and 45 deletions

View File

@@ -19,11 +19,8 @@ import inf101.v18.grid.ILocation;
import inf101.v18.rogue101.Main;
import inf101.v18.rogue101.enemies.Girl;
import inf101.v18.rogue101.examples.Carrot;
import inf101.v18.rogue101.items.IBuffItem;
import inf101.v18.rogue101.items.IWeapon;
import inf101.v18.rogue101.items.Manga;
import inf101.v18.rogue101.items.*;
import inf101.v18.rogue101.examples.Rabbit;
import inf101.v18.rogue101.items.Sword;
import inf101.v18.rogue101.map.GameMap;
import inf101.v18.rogue101.map.IGameMap;
import inf101.v18.rogue101.map.IMapView;
@@ -91,6 +88,11 @@ public class Game implements IGame {
}
}
// Prints some helpful information.
String[] info = {"Controls:", "WASD or arrow keys for movement", "E to pick up an item", "Q to drop an item", "1-5 to choose an item", "N to change name", "ENTER to confirm", "R to use a ranged attack", "F to use a magic attack"};
for (int i = 0; i < info.length; i++) {
this.printer.printAt(map.getWidth() + 2, 1 + i, info[i]);
}
}
public Game(String mapString) {
@@ -339,6 +341,7 @@ public class Game implements IGame {
itemFactories.put("G", Girl::new);
itemFactories.put(".", Dust::new);
itemFactories.put("S", Sword::new);
itemFactories.put("c", Chest::new);
}
@Override