shavingcream blindness

This commit is contained in:
jslightham
2019-05-30 23:44:30 -04:00
parent 38a10f116d
commit df3d031933
8 changed files with 45 additions and 18 deletions

View File

@@ -502,7 +502,7 @@ class Game {
if(command.hasItem()) {
boolean has = false;
for(Item i : player.getInventory()) {
if(i.getName().toLowerCase().equals(command.getItem())) {
if(i.getName().toLowerCase().replaceAll("\\s+","").equals(command.getItem())) {
has = true;
}
}
@@ -525,7 +525,7 @@ class Game {
if(command.hasItem()) {
boolean has = false;
for(Item i : player.getInventory()) {
if(i.getName().toLowerCase().equals(command.getItem())) {
if(i.getName().toLowerCase().replaceAll("\\s+","").equals(command.getItem())) {
has = true;
}
}